All Questions
10 questions
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 ...
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, ...
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:
...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 - ...