I have VDF (Vacuum Fluorescent Display) connected to port COM 6 on my PC, the VDF came with “VFD_DLL.dll” Library and instructions on how to use it but it’s written in C language, can anyone help in converting the below code to VB?
//how to load dll
hDll = LoadLibrary("VFD_DLL.dll");
//how to release dll
FreeLibrary(hDll);
//PortOpen
long PortOpen(char PortName[]);
//how to define function pointer type
typedef long (*PortOpenFunc)();
//how to get function pointer pointed to function of dll
PortOpenFunc lpPortOpenFunc;
lpPortOpenFunc = (PortOpenFunc)GetProcAddress(hDll,"PortOpen");
//how to call function of dll
lpPortOpenFunc();
//DisplayText
long DisplayText(char str[]);
//how to define function pointer type
typedef long (*displayTextFunc)(char str[]);
//how to get function pointer pointed to function of dll
displayTextFunc lpdisplayTextFunc;
lpdisplayTextFunc = (displayTextFunc)GetProcAddress(hDll,"displayText" );
//how to call function of dll
char* Temp = (char*)(const char*)str;
lpdisplayTextFunc(Temp);
-------------------------------------------