when I pass a session from the exe form to a DLL for.
I use C++ Builder 5 Update Pack 1 on Windows 2000.
Sample DLL code I use.
#pragma argsused
extern "C" void __declspec(dllexport) __stdcall ShowDiscrepancyQueueHandler(TOracleSession *globalSession);
void __stdcall ShowDiscrepancyQueueHandler(TOracleSession *globalSession)
{
TfrmDQHandler *frmDQHandler = new TfrmDQHandler(NULL);
frmDQHandler->OracleSession1->Connected = false;
frmDQHandler->OracleSession1 = globalSession;
frmDQHandler->Show();
}
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved)
{
return 1;
}
//---------------------------------------------------------------------------
I call the ShowDiscrepancyQueueHandlerin the main exe that has a session that has logged on.
In formshow of the DLL(frmDQHandler) I tested the connection which return true.
TCheckConnectionResult r = OracleSession1->CheckConnection(false);
switch(r)
{
case ccOK: ShowMessage("OK");break;
case ccError: ShowMessage("Error");break;
case ccReconnected: ShowMessage("Reconnect");break;
}
When I try to reference any dataset/query I get the error.
Thanks in advance...
I use C++ Builder 5 Update Pack 1 on Windows 2000.
Sample DLL code I use.
#pragma argsused
extern "C" void __declspec(dllexport) __stdcall ShowDiscrepancyQueueHandler(TOracleSession *globalSession);
void __stdcall ShowDiscrepancyQueueHandler(TOracleSession *globalSession)
{
TfrmDQHandler *frmDQHandler = new TfrmDQHandler(NULL);
frmDQHandler->OracleSession1->Connected = false;
frmDQHandler->OracleSession1 = globalSession;
frmDQHandler->Show();
}
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved)
{
return 1;
}
//---------------------------------------------------------------------------
I call the ShowDiscrepancyQueueHandlerin the main exe that has a session that has logged on.
In formshow of the DLL(frmDQHandler) I tested the connection which return true.
TCheckConnectionResult r = OracleSession1->CheckConnection(false);
switch(r)
{
case ccOK: ShowMessage("OK");break;
case ccError: ShowMessage("Error");break;
case ccReconnected: ShowMessage("Reconnect");break;
}
When I try to reference any dataset/query I get the error.
Thanks in advance...