P
Paul Brun
I have a VB function that I need to get from my C++ App, however, I have
tried numerous
mechanisms to access it, however, I do not get an appropriate return value.
I have one function that takes in three parameters called Generate(long,
int, int) and it returns
a long. Here is a snippet of the code. I used the appropriate #import
statement from my stdafx.h
file and the DLL is available within the runtime directory. Help would be
appreciated.
HRESULT hresult;
CLSID clsid;
CoInitialize(NULL);
hresult = CLSIDFromProgID(OLESTR("ProjectName.Classname"), &clsid);
_ClassPtr *t;
hresult = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER,
__uuidof(_ClassPtr), (LPVOID*) &t);
if (FAILED(hresult))
{
....
}
long generatedMOP = t->Generate(&SysID, &agents, &nodes);
t->Release();
CoUninitialize();
Assistance would be appreciated.
Thank you
Paul
tried numerous
mechanisms to access it, however, I do not get an appropriate return value.
I have one function that takes in three parameters called Generate(long,
int, int) and it returns
a long. Here is a snippet of the code. I used the appropriate #import
statement from my stdafx.h
file and the DLL is available within the runtime directory. Help would be
appreciated.
HRESULT hresult;
CLSID clsid;
CoInitialize(NULL);
hresult = CLSIDFromProgID(OLESTR("ProjectName.Classname"), &clsid);
_ClassPtr *t;
hresult = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER,
__uuidof(_ClassPtr), (LPVOID*) &t);
if (FAILED(hresult))
{
....
}
long generatedMOP = t->Generate(&SysID, &agents, &nodes);
t->Release();
CoUninitialize();
Assistance would be appreciated.
Thank you
Paul