C++ software development question for DACAL DC300

Dacal's API
http://www.dacal.com.tw/api.html

In the sample program provided by Dacal's API, SetCDCallbackProc is a function contained with USBCDDLL.dll. This function exists so the developer can set a function to be called when the number of DACAL DC300 devices changes... like when/if someone unplugs the USB port connecting the device to the computer. Though this seems to work in the sample program... I cannot get this functionality to work in my own code!

I have the following in USBCDDLL.H:
#define API_CALL __stdcall
#define API_CALLBACK __stdcall
#define DECLSPEC_IMPORT __declspec(dllimport)
...
typedef void (API_CALLBACK* CDDeviceChangePROC)(int);
...
DECLSPEC_EXPORT void API_CALL SetCDCallbackProc(
CDDeviceChangePROC lpProc);

The function call:
SetCDCallbackProc((CDDeviceChangePROC)OnCDDeviceChange);

The function that should be called:
void API_CALLBACK OnCDDeviceChange(int nDeviceNumber)
{
cout << "\n foo";
}

I have never seen the "foo" statement in my output when I disconnect my
Dacal DC300 from my computer. Am I doing something wrong? If you have any
suggestions, they are greatly appreciated.
Last edited on
Topic archived. No new replies allowed.