- #include "smdidynamic.h"
- /* Open the library */
- HINSTANCE hSmdiDll = LoadLibrary ( "smdi.dll" );
- if (hSmdiDll == NULL)
- {
- printf ("Couldn't open smdi.dll !\nError code: %d\n",GetLastError());
- return(1);
- }
- /* Getting the function addresses */
- SMDI_Init = GetProcAddress ( hSmdiDll, "SMDI_Init" );
- if (SMDI_Init == NULL) SMDI_Init = GetProcAddress ( hSmdiDll, "_SMDI_Init" );
- SMDI_MasterIdentify = GetProcAddress ( hSmdiDll, "SMDI_MasterIdentify" );
- if (SMDI_MasterIdentify == NULL) SMDI_MasterIdentify = GetProcAddress ( hSmdiDll, "_SMDI_MasterIdentify" );
- /* Calling the functions */
- if (SMDI_Init() > 0)
- printf("ha 0, id 0 SMDI Master Identify response: 0x%x\n", SMDI_MasterIdentify ( 0, 0 ));
- /* Closing the library */
- FreeLibrary ( &hSmdiDll );
|