com

Is IStorage's Compound File Implementation thread-safe?

I'm using IStorage's Compound File Implementation from C# (StgCreateDocfile). Is it safe to access one IStorage / IStream instance from multiple threads, provided I synchronized the reads and writes myself? Or are there any COM issues that might be problematic here? For example, can I safely call EnumElements to get all streams in the ...

Using VS 2008 (vb.net) I need to create an object I can use in Classic ASP with CreateObject

I am very new to VB.net. I have written these objects in VB6 before. I'm just lost in VB.net, but (kicking and screaming) I have to learn how to do this. I've been googling for hours with only minor steps forward. Can anyone post a link that explains start to finish how to do this? I have managed to write the class object, What I can no...

Call C# methods from C++ without using COM

Hi, Is there a way to create C# objects and call methods from unmanaged C++, but without using COM Iterop? I am looking for something like JNI (but for .Net), where you can manually create the VM, create objects, etc. ...

Is possible having two COM STA instances of the same component?

I had a problem discovered on another thread here, I need to access a COM component that is STA. I'll run it on a dual-core computer, a process using this component only reaches 50% of CPU. Unfortunately, the owners said they can't change the component to MTA, because the component is a hybrid system compiled at Matlab, which core is C. ...

Retrieving the COM class factory for component with CLSID {XXXX} failed due to the following error: 80080005

What is the troubleshooting process for the "Retrieving the COM class factory for component with CLSID {XXXX} failed due to the following error: 80080005" errors in .Net? To clarify: I am getting this at runtime, on my XP machine, with client being .net code running under admin account. {XXXX} refers to one of our in-house COM components...

What could cause Vb6 run time error 430

I have a COM dll written in vb6. When I try to create a new object of a class module from this dll I get a Run timer error 430: Class does not support automation or does not support expected interface. The interesting thing is that this happens only from outside the IDE, when I am debugging from within the IDE there is no error thrown an...

Reg-Free COM in an ASP.Net application

I am wondering if it is possible to use Reg-Free COM in an ASP.Net application? ...

Using C++ COM interface in C# for both client and server

Hi all, I need to make a piece of C# code interact through COM with all kinds of implementations. To make it easeier for users of that integration, I included the interacted interfaces in IDL (as part of a relevant existing DLL, but without coclass or implementation), then got that into my C# code by running Tlbimp to create the types ...

Set OLE Request Timeout from C++

I am instantiating a local COM server using CoCreateInstance. Sometimes the application providing the server takes a long time to start. When this happens, Windows pops a dialog box like this: Server Busy The action cannot be completed because the other program is busy. Choose 'Switch To' to activate the busy program and correct the ...

Connect to COM events in C# - support both managed and unmanaged servers

Hi, I'm writing C# code that needs to connect to COM events. I implemented the use of IConnectionPointContainer and IConnectionPoint thus: IConnectionPointContainer connectionPointContainer = internalGenerator as IConnectionPointContainer; if (connectionPointContainer == null) { Debug.Fail("The script generat...

Why does a call to unmanaged code from a .NET BackgroundWorker thread affect the UI?

I have a long running series of operations in a .NET 2.0 BackgroundWorker thread. When I make a call to unmanaged code located in a referenced assembly the UI is frozen until the call completes. Why is this? Should I not be making these calls from the BackgroundWorker thread? ...

Win32: Registry entries required to register an ActiveX control?

i need write the code that runs when DllRegisterServer is called. i.e. when someone calls: regsvr32 myActiveX.ocx i'm trying to find the definitive list of required registry entries (rather than just what i can cobble together by spellunking through the registry). So far my expeditions have found: HKEY_CLASSES_ROOT \MyCoolLibrary...

Can I be sure that the code I write is always executed in the same thread?

I normally work on single threaded applications and have generally never really bothered with dealing with threads. My understanding of how things work - which certainly, may be wrong - is that as long as we're always dealing with single threaded code (i.e. no forks or anything like that) it will always be executed in the same thread. I...

What's the best way to transfer data from python to another application in windows?

I'm developing an application with a team in .Net (C++) and provide a COM interface to interact with python and other languages. What we've found is that pushing data through COM turns out to be pretty slow. I've considered several alternatives: dumping data to a file and sending the file path through com Shared Memory via mmap? Stre...

When To Change a GUID on a Type Library

I know that when you add/change/remove methods in a COM interface you're supposed to change the interface/coclass GUID but what about type libraries. When should you change the type library's GUID? Do you change it if a GUID inside the type library has changed? Or should you only change it when something that doesn't have its own GUID w...

Getting the version of a COM object

I am accessing a .NET COM object from C++. I want to know the version information about this COM object. When I open the TLB in OLEVIEW.exe I can see the version information associated with the coclass. How can I access this information from C++? This is the information I get: [ uuid(XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX), version(1....

Initalizing ArcEngine, Make it Faster?

I am currently working on a C++/COM project using ArcEngine(From ESRI). Aside from the fact that there is little to no support in terms of documentation (SDK is there.) Anyways, i am wondering if anyone here has had any experience in making the initialization process of ArcEngine faster. Right now it takes 30-35 seconds just to initializ...

Outlook Interop: How to iterate over all items in folder

I would like to search the bodies of all outlook items. I know how to do this for the four PIM items (Notes/Tasks/Appointments/Contacts). But the code is identical for all of them with the exception of casting the COM object to the specific item type (i.e., ContactItem, AppointmentItem, etc). Is there a parent class for these PIM items...

Converting a fairly simple C# Class library into a COM object ?

Here's my problem: I have to call a web service with a secure header from a classic ASP page that returns a complex data type. For various reasons concerning a 3rd party tool it has to be classic ASP. We decided that I should create an external dll to do this - which I did (in c#) so it returns a dataset (Something ASP can understand)...

File Access from Excel COM object fails when run from NT Service on Vista

We use COM objects to access excel spreadsheets in an NT service (via the Windows Scripting Host). Prior to Vista, this worked beautifully, but starting with Vista, we receive this error: Microsoft Office Excel cannot access the file 'c:\myfiles\test.xls'. There are several possible reasons: • The file name or path does not exist. • Th...