Results 1 to 1 of 1

Thread: Canon Digital Camera SDK implementation problems

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2006
    Location
    Vienna, Austria
    Posts
    31

    Unhappy Canon Digital Camera SDK implementation problems

    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:
    1. 'The declaration:
    2. Public Declare Function CDEnterReleaseControl Lib "CDSDK.dll" ( _
    3.     ByVal hSource As Long, _
    4.     ByVal pFunc As Long, _
    5.     ByVal Context As Long) As Long
    6.  
    7. 'Usage in the code:
    8.  
    9.     lngRetVal = CDEnterReleaseControl(m_lngCurrentOpenedDevHandle, _
    10.         AddressOf cdReleaseEventCallbackFunction, 0&)
    11.  
    12. 'The callback function:
    13.  
    14. Public Function cdReleaseEventCallbackFunction( _
    15.     ByVal cdEventID As Long, _
    16.     ByRef pData As Long, _
    17.     ByVal DataSize As Long, _
    18.     ByVal Context As Long) As Long
    19.  
    20.     'Do something...
    21.    
    22.     'Default return value:
    23.      cdReleaseEventCallbackFunction = cdOK
    24. End Function




    What I doing wrong? Have somebody experience with implementation of callbacks using Canon SDK in VB6?

    Thank's in advance!
    Last edited by Bart73; May 23rd, 2006 at 05:41 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width