LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Illegal use of type name 'HINSTANCE'.

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;
}

 

0 Kudos
Message 1 of 2
(3,550 Views)
i  solved thanks.
0 Kudos
Message 2 of 2
(3,548 Views)