Hey everyone,
When i create an instance of an object in my local COM-Server the class is requested to provide various interfaces which are marshaling related. As ive seen in the web the default marshaler can be used but for that either a proxy DLL has to be there or a typelib should be used. I created an ODL file describing my interface and class:
import "oaidl.idl";
import "ocidl.idl";
[
object,
uuid(3DBCAC5E-1A1B-4E56-B9AD-DCF19597B869),
pointer_default(unique)
]
interface ITestClass : IUnknown {
[id(1)] HRESULT Foo(int);
};
[
uuid(737BB030-CE7A-4361-9C7E-1A1D697B9493),
version(1.0),
]
library LocalServerLib
{
importlib("stdole2.tlb");
[
uuid(3DBCAC5E-1A1B-4E56-B9AD-DCF19597B868)
]
coclass TestClass
{
[default] interface ITestClass;
};
};
With the according definition:
class __declspec(uuid("{3DBCAC5E-1A1B-4E56-B9AD-DCF19597B869}"))
ITestClass : public IUnknown
{
public:
virtual HRESULT Foo(int value) = 0;
};
class __declspec(uuid("{3DBCAC5E-1A1B-4E56-B9AD-DCF19597B868}"))
TestClass
{
};
The typelib is registered using
RegisterTypeLibForUser
and my class has an entry TypeLib with the GUID of the registered type lib.
But well, still COM requests all the marshaling from my class. Am i missing something?
Greetings and thanks
Regner