Hello,
I'm using the latest Digital Camera SDK from the Canon (ver. 7.3). Canon doesn't support VB6 development anymore.
But I have translated all included .h files to proper VB6 declarations.
Now I have trouble with CDEnterReleaseControl function. This function register the callback function. After calling this CDEnterReleaseControl, the camera doing "something" and my application is hanging (there is no return from CDEnterReleaseControl, application is hanging in this point).
Here is the code snippet:VB Code:
'The declaration: Public Declare Function CDEnterReleaseControl Lib "CDSDK.dll" ( _ ByVal hSource As Long, _ ByVal pFunc As Long, _ ByVal Context As Long) As Long 'Usage in the code: lngRetVal = CDEnterReleaseControl(m_lngCurrentOpenedDevHandle, _ AddressOf cdReleaseEventCallbackFunction, 0&) 'The callback function: Public Function cdReleaseEventCallbackFunction( _ ByVal cdEventID As Long, _ ByRef pData As Long, _ ByVal DataSize As Long, _ ByVal Context As Long) As Long 'Do something... 'Default return value: cdReleaseEventCallbackFunction = cdOK End Function
What I doing wrong? Have somebody experience with implementation of callbacks using Canon SDK in VB6?
Thank's in advance!


Reply With Quote