I have a Win32 application (Visual C++ 6) that uses HINSTANCE to call an external DLL.
I need to convert it to a console app that take 1 argument and echo the result because I intend of using it on linux (compiling it using mono).
Here is a copy of the main.cpp:
int APIENTRY WinMain(HINSTANCE hInstance,
in testlib.c I have:
if(TESTLIB == NULL)
MessageBox(NULL, "Unable to load TESTLIB.DLL", "ERROR", MB_OK);
Is it possible to do it.
You still need to include "windows.h" for the windows application even if it is a 'console' application because you want to use calls like LoadLibrary and such, which are perfectly valid to call.
You obviously need to remove the message boxes and other calls that bring up windows, if you don't want a 'window interface' at all on your program.
I think the oriignal error you mentioned was because it did not have a declaration for LoadLibrary function.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)