CoInitialize has not been called
-
Hi I have a little problem with VB. Im using a dll in the project and it works fine until i close the application then i get a "CoInitialize has not been called" error?? Why? and its only in debug mode?? /H :confused:
What DLL are you using? Is the error message a VB generated error or is the DLL generating it? You'll need to post some code or more details for us to assist. Michael :-)
-
What DLL are you using? Is the error message a VB generated error or is the DLL generating it? You'll need to post some code or more details for us to assist. Michael :-)
The error message is a VB generated error message and the dll im using is a C++ dll (using _stdcall and its NOT a COM dll). The strange thing is that the error message don't appear every time and it never appear if i make a EXE file of the vb project. My source cod: Vb: Public Declare Function Data Lib "E:\C++ Program\Test\Debug\Test.dll" _ Alias "_CreateData@4" (ByVal pDb As Long) As Long Dim Temp As Long Temp = Data(10) C++: .h extern "C" { __declspec(dllexport) long PASCAL CreateData (long iDatabaseId); } .cpp #include "Test.h" long PASCAL CreateData(long iDatabaseId) { return iDatabaseId*10; } I would bee so happy if you could help me :) /Z