10-09-2008 11:22 PM
Dear everyone;
I got a problem when i tried to acess the .dll file without importing .lib file. the following is my c file.
i got an error that"Illegal use of type name 'HINSTANCE'."
how can i fix it?? thanks a lot.
#include <windows.h>
#include <formatio.h>
#include <cvirte.h>
#include <stdio.h>
typedef int (*fd)(int,int);
char string[100];
int main (int argc, char *argv[])
{
if (InitCVIRTE (0, argv, 0) == 0)
return -1; /* out of memory */
HINSTANCE hinstLib;
fd procadd;
hinstLib=LoadLibrary("dll.dll");
procadd=(fd)GetProcAddress(hinstLib,"add");
int a=(procadd)(5,5);
Fmt(string,"%s<%d",a);
MesagePopup("aa",string);
FreeResult = FreeLibrary(hinstLib);
return 0;
}
10-09-2008 11:32 PM