I try to use a ADO component and export it in a DLL library. When I run it with an other program with the debugger, the only object returned 'CreateInstance' is a NULL pointer one.
Could you help me please ?
here below, the function :
and the calling program :
tanks for replying
Could you help me please ?
here below, the function :
Code:
MYDCLSPEC short _stdcall connectDB()
{
HRESULT hr = NOERROR;
IADORecordBinding *piAdoRecordBinding = NULL;
strConnection = _T("Provider=MSDAORA.1;Password=seat;User ID=seat;Data Source=seatecole;Persist Security Info=True");
strCmdText = _T("select * from tbl_cible");
RS_seat = NULL;
try
{ RS_seat.CreateInstance(__uuidof(Recordset));
RS_seat->CursorLocation = adUseClient;
( .................. etc ............... )
}
catch (_com_error )
{
return 1;
}
if (piAdoRecordBinding)
piAdoRecordBinding->Release();
return 0;
}
Code:
#include "C:\Recup\manipOracleC\dllBD\dllBD.h"
int main(int argc, char* argv[])
{
( ................ )
// Test de la base de donnée
if ( (resultat = connectDB()) == 1) {
printf("Bad Connection\n");
return 0;
}
( .................. )
}
tanks for replying