Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
1 answer
104 views

Does COM marshaling work with objects created using CComCoClass::CreateInstance?

Sorry if this is a dumb question, but I was wondering if the COM pointer-marshaling functions will work with objects created using ATL's CComCoClass::CreateInstance. According to the docs, that ...
user avatar
2 votes
3 answers
2k views

Why would QueryInterface() fail when the interface is surely implemented and has built-in marshaller in Windows?

I have the following setup. There's a COM server that is installed into COM+ (to run in a separate process) and has this interface definition: [object, uuid("InterfaceIdHere"), nonextensible, ...
sharptooth's user avatar
  • 170k
15 votes
1 answer
2k views

Out-of-proc COM server stuck

I'm using out-of-proc COM server (COM singleton "Engine" implemented using DECLARE_CLASSFACTORY_SINGLETON), it works in STA (CComSingleThreadModel, _ATL_APARTMENT_THREADED). COM server clients: ...
KAdot's user avatar
  • 2,077
0 votes
1 answer
1k views

How to marshal IDL struct containing SAFEARRAY of UDT to managed code

I have a COM library defined with this IDL code: struct T_GPSParamsMap { BSTR Key; BSTR Value; }T_GPSParamsMap; struct T_FwClient { BSTR Alias; SMSFilterActionEnum ...
Barzo's user avatar
  • 1,049
1 vote
1 answer
263 views

Problems getting access to a STA object from another process

I have been trying something which may turn to be impossible in the end. It's been a long while since I've been in COM land. Consider two apps and a COM STA DLL. First app loads COM STA DLL as a ...
wpfwannabe's user avatar
  • 14.8k
2 votes
1 answer
876 views

ATL sample of calling (marshalling) Apartment-threaded COM interfaces from a worker thread

I'm looking for a code sample which illustrates making cross-threaded COM calls in an ATL COM Server DLL. Know one? More details: My component is an IE Browser Helper Object which needs to do work ...
Justin Grant's user avatar
  • 46.5k
1 vote
1 answer
1k views

Marshalling a VARIANT back from COM to C++ client

I'm attempting to marshal a safearray of BSTRs from a COM object, back to a C++ client application. My IDL definition of the function involved: [id(5), helpstring("method GetStreams")] HRESULT ...
user avatar
1 vote
1 answer
1k views

How to return an [out] variant with VT = VT_RECORD without creating memory leak in ole32.dll?

Purify is pointing memory leak in ole32.dll while returning a Variant with VT set to VT_RECORD as OUT parameter. I am using User Marshalling by generating proxy/stub dll from IDL. Can you suggest how ...
picarodevosio's user avatar
0 votes
1 answer
698 views

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 ...
sharptooth's user avatar
  • 170k
4 votes
3 answers
2k views

What is required to enable marshaling for a COM interface?

I have a 32-bit ATL COM component without a type library. It has a class factory for one given class that implements several interfaces. When I use it as an in-proc server, everything works fine - ...
sharptooth's user avatar
  • 170k