com

C# COM Interop Library

Hey all, I am currently porting a legacy VBA application to a .Net application. During this process the users of the existing VBA application need to have some features added. So instead of coding them in VBA & then later in C#, I’ve wrote the new functionality in C# and I want to expose this to the existing VBA application through COM, ...

What are easy ways to use a 32-bit in-proc COM server from 64-bit applications?

I have a 32-bit native C++ ATL in-proc COM server which depends on a huge set of legacy 32-bit libraries. I need to use it from a 64-bit application with the smallest changes possible. One option is putting it into a COM+ application. What are other easy options? ...

ColdFusion COM error

I am upgrading from CF4.5 to CF8. Calls to COM dll's that used to work in version 4.5 now throw a "Complex object types cannot be converted to simple values.." error. The COM object has a few arrays defined as output parameters. These variables are being defined as arrays in Coldfusion. Any idea as to what has changed in CF to cause thi...

How does this strange 32-bit/64-bit interop solution work?

I'm currently maintaining a piece of software that we outsourced couple of years ago and that is poorly documented. The piece is a COM server for consuming by third-party applications and an installer that does all necessary deployment. There's the core compiled as 32-bit DLL and meant to be used from 32-bit applications. And there's al...

How exactly do I config DCOM to load my DLL into a separate process?

I'm trying to force an existing native C++ ATL in-proc COM server into a separate process. I hope DCOM can do this for me without changing the COM server. I started with a usual registry setup - I have a HKCR\CLSID{classId} entry and an InProcServer32 key there specifying the path to the .dll file. I generated an application id (GUID) ...

Which VC++ runtime version do I choose - static or dynamic?

I'm developing a 64-bit in-proc VC++ ATL COM server that basically just redirects all calls to an out-proc COM server. So my COM server basically does nothing. Initially it used the C++ runtime in a DLL (/MD compiler switch). I've noticed that when I deploy it on a clean 64-bit Win2k3 regsvr32 fails with an error: LoadLibrary({fileName}...

Which do I choose for hosting my in-proc server in a separate process - COM+ or DCOM?

I need to shield a 64-bit COM component consumer from the 32-bit native C++ ATL in-proc COM component. Seems like both COM+ and DCOM can host my in-proc component in a separate process and do the marshalling so that both me and the consumer application don't care of it and I even don't have to change my in-proc component at all. I tried...

COM Basic links

Hi, folks can you provide me the tutorial link or .pdf for learning basic COM?. i do google it.. still i recommend answers of stackoverflow so please pass me.. Thanks ...

C# - get event from SetWindowText

We are writing a plugin for an existing VB6 application (via COM interop), and we are requiring some functionality that they do not support. We could easily get the required functionality if we could somehow receive an event for when a particular control's text on their window changes. We can already grab their existing window handle o...

Does anyone know where I can find the standard windows file dialog toolbar icons?

I'm trying to roll my own implementation of IShellBrowser because I need to have a more full-featured File Open and Save As dialog than Windows allows that is compatible with XP (and ideally with W2000)* At this point I need to add the standard toolbar that you see in upper right of the dialog (manifest styles for XP and earlier) - a ba...

PHP COM failed on Windows 2008 Server

I use COM in PHP to manipulate MS Word 2003 with success in Windows server 2003, but the same code are broken in Windows 2008 server. I've changed the user to administrator but still the same error occurred. For the code below: <?php // starting word $word = new COM("word.application") or die("Unable to instantiate Word"); echo "Loaded...

Why would Windows Search query my IFilter for a bunch of weird interfaces?

I've implemented an IFilter as a native VC++ ATL in-proc COM server. Windows Search wouldn't use it - it creates an instance of my IFilter and then executes a bunch of QueryInterface() calls, specifically: IMarshal IStdMarshalInfo something with {4C1E39E1-E3E3-4296-AA86-EC938D896E92} interface id and a couple of others. Since my IFil...

How do I implement marshalling in a VC++ ATL COM server?

While implementing my own IFilter I found that most likely some consumers will require marshalling from it. That is they QueryInterface() the IMarshal interface from my object. Proxy/stubs from MIDL can't be used - MIDL will not compile the filter.idl file - the latter uses custom structures and MIDL doesn't know what to do with them. S...

How do I set the encoding statement in the XML declaration when performing an XSL transformation using a COM Msxml2.XSLTemplate?

I wrote a simple package installer in WinBatch that needs to update an XML file with information about the package contents. My first stab at it involved loading the file with Msxml2.DOMDocument, adding nodes and data as required, then saving the data back to disk. This worked well enough, except that it would not create tab and CR/LF wh...

How does .NET/COM work with multiple versions registered via Regasm?

I have a .NET DLL (that happens to be written in C++/CLI). Parts of it I want to expose via COM. I do this and register it using "regasm my.dll /codebase". So far so good. But then I change some things and the version number of the assembly changes plus I move the dll to a different folder. I register it again and look at my COM obj...

Duplex WCF + Static Collection of COM objects

I am trying to build a WCF service that exposes the functionality of a particular COM object that I do not have the original source for. I am using duplex binding so that each client has their own instance as there are events tied to each particular instance which are delivered through a callback (IAgent). It appears there is a deadloc...

How to get the Displayed Webpage source

Hi, how can i get the web-page source displayed on a web-browser control, either in c# or Win32.even ATL COM also fine. i mean.. i dont want to create new "HTTPReqest" or "openURL" to get source.. i want to get the source from the control only..is it possible for windows mobile.. if so how?.. please let me know. Thank u ...

How does COM select how to marshal an interface?

As I get it there're three ways to implement marshalling in COM: typelib marshalling proxy/stub marshalling implementing IMarshal by the object now how does the component consumer (user) choose which one will be used? Does it decide on its own and use the preferred way or does it call some built-in function and it solves the problem ...

Weird namespace addition when importing a typelib

I want to add a method accepting IStream* to my COM interface. Here's the idl excerpt: import "oaidl.idl"; import "ocidl.idl"; import "objidl.idl";//IStream is declared in this .idl file [ uuid(uuidhere), version(1.0) ] library MyLibrary { importlib("stdole32.tlb"); importlib("stdole2.tlb"); [ object, uuid(...

Error when instantiating .NET/COM interop class via classic ASP

Hi all, I am having a problem when trying to instantiate a C# .NET class that's been exposed to COM in a classic ASP application. I've used tlbexp to generate a typelib and registered it in Component Services; now when trying to create the object as such: Server.CreateObject("The.Class.Name") I am getting the error: Server object er...