Hi! I've been looking through online materials on this matter with no concrete definitions of what I can do with this. I am trying to export some of the functions from my class residing in my executable. I have tried every which way I can imagine but the variables I am passing are shifting when I have entered the exported function.
with lpszDllEffect = A and lpszXmlEffect = B;
HRESULT G_A_U_D::NewModuleEffect( LPCWSTR lpszDllEffect, LPCWSTR lpszXmlEffect )
{
HRESULT hr = S_OK;;
HINSTANCE hdll = NULL;
typedef HRESULT (*pNewModuleEffect)( LPCWSTR, LPCWSTR );
pNewModuleEffect NewModuleEffect;
hdll = GetModuleHandle(L"C:/Projects/DUALITY/X64/Debug/DUALITY.EXE");
NewModuleEffect = (pNewModuleEffect)
(GetProcAddress( hdll, "NewModuleEffect" ));
hr = NewModuleEffect( lpszDllEffect, lpszXmlEffect );
if(FAILED(hr))
return hr;
return hr;
}
results in here
extern "C" HRESULT DMA::NewModuleStudio( LPCWSTR lpszDllStudio, LPCWSTR lpszXmlStudio )
{
HRESULT hr = S_OK;;
HINSTANCE hdll = NULL;
typedef void (*pLoadStudio)(ICLIENT**);
pLoadStudio LoadStudio;
wstring Plug = DIR_ROOT + DIR_DLL + wstring(lpszDllStudio);
hdll = LoadLibraryEx(Plug.c_str(), NULL, 0 );
LoadStudio = (pLoadStudio)(GetProcAddress( hdll, "GetNewClient" ));
LoadStudio(&Client);
ISerialize* LoadClient;
hr = Client->QueryInterface(IID_ISerialize, (void**)&LoadClient);
if(FAILED(hr))
return hr;
LoadClient->Deserialize(lpszXmlStudio);
return hr;
}
are lpszDllEffect = B and lpszXmlEffect = unknown ptr;
I have tried both def file and __declspec( dllexport ) and also have tried changing my types to UINT with the same result. Is this just not possible? Looking at MSDN it does not actually say either way and it general sticks with "to export a class and ALL of its members..." I don't wan't to export all of the members but I don't want to start mucking around with STATIC members.
My present alternative is to maintain the flow through the abstract interface acquired when loading the DLL. This would just mean timing the events and sequencing the passing of variables through each call.
First thread, hi! o-o