IParameterDLLPtr ptr;
CLSID iID = __uuidof(Sample);
HRESULT hr = ptr.CreateInstance(__uuidof(Sample), NULL, CLSCTX_INPROC);
The variable
ptr
needs to be initialised to some object before you can call one of its methods.
You can do this much more easily by using the
CoLoadLibrary
function[
^].