DLL Interfacing
Explicit DLL Linking
96
E1852B Operating Guide
DllHandle = LoadLibrary("." E1852B_DLL_NAME);
if (DllHandle == NULL)
{
ShowWin32Error(E1852B_DLL_NAME);
return FALSE;
}
// Then setup function pointers.
#ifdef __BORLANDC__
#pragma warn -8075
// Avoid Borland warning
#endif
#pragma warning( disable : 4057) // Avoid Microsoft VC warning
#pragma warning( disable : 4133) // Avoid Microsoft VC warning
#pragma warning( disable : 4113) // Avoid Microsoft VC warning
LOADFUNC(RtxWrt);
LOADFUNC(RtxRd);
}
return TRUE;
}
/
******************************************************************
* DESCRIPTION:
******************************************************************
/
void UnloadDll(void)
{
if (DllHandle != NULL)
{
FreeLibrary(DllHandle);
DllHandle = NULL;
}
}
// End of file.
/
******************************************************************
* DESCRIPTION:
******************************************************************
/
void SendScpiCommand(char* ScpiStr)
{
uint16 Errors;
// Send SCPI command
printf("SCPI command : %s",ScpiStr);
Errors = RtxWrt((far int8 *)ScpiStr);
E1852-90007.book Page 96 Monday, February 4, 2002 2:09 PM
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com