Re: Howto initialize a private (not registred) interface?
Thanks for the fast replies.
The second parameter of CComCoClass should be a CLSID,
not an interface IID.
Hm..., I added this to project idl file
[
uuid(29B14D2D-9324-4627-B260-AF49097FC4BA),
helpstring("Callback Class")
]
coclass Callback
{
[default] interface IDiaLoadCallback2;
};
which gives a CLSID_Callback. OK?
This is the only way I can think of to get a CLSID since
IDiaLoadCallback2 is specified in the DIA SDK idl file but the
interface is not implemented.
As for the initialize method, I thought since I already got a main
object of type IDiaDataSource, I should use this via IUnknown to
initialize my implemented IDiaLoadCallback2 interface. You both
suggest I should create a new object for IDiaLoadCallback2. I
suspected something like this but it seems wrong somehow.
In the sample code of DIA SDK they just created a C++ class that
inherit IDiaLoadCallback2 and use Addref() to initialize an instance
of that class.
The only use for the callback interface is if one want to control
where to look for symbol files (normally http://msdl.microsoft.com/download/symbols).
Like this
hr = m_pDiaDataSource->loadDataForExe(
pszFilename, pszServerpath, (IUnknown*)m_pCallback);