Hi,
my client passed me a COM+ DLL, written in VB6, which now works in a standard MS VS2005 console application (click image to enlarge):



Now, in Lite-C I just want to do the same. I read through all pages in the manual regarding COM and also digged the forum. It seems that only a few tried that. My options are either writing the COM connection in Lite-C (preferred) or writing a wrapper DLL in C++/VS2005 (will work for sure, but I really don't want to do that).

Now, if I run CoInitialize, it already fails, it says: "CoInitialize Failed: 1"...:

Code:
#include <acknex.h>
#include <default.c>
#include <com.h>
	
int main ()
{
	// open the COM interface
	HRESULT hr = CoInitialize(NULL);
	if (hr != S_OK)
	{
		printf("CoInitialize Failed: %x\n\n", hr);
		return 0;
	}
	else 
		printf("CoInitialize succeeded\n");
}



So, what is going on? I don't know, since CoInitialize does not fail in my C++ app, but in Lite-C...?

Last edited by HeelX; 09/07/11 20:55.