Results 1 to 6 of 6

Thread: API callback function

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2000
    Posts
    25

    Question

    I have this API callback function, but it's only documented in C++ code.

    virtual void File_Switch(CVideoDecoderSettings* pSettings)

    pSettings represents a handle.

    I was just curious how to set this up in VB so it will return the value it's supposed to(or however that works)

    Anyone got any suggestions?

    Thanks,

    Bob

    [Edited by Bob724 on 05-18-2000 at 10:19 PM]

  2. #2
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Rotterdam, Netherlands
    Posts
    386
    I guess the function should be in VB something like:
    Public Sub File_Switch(ByRef pSettings As Long)
    Not 100% sure about the Byref...
    You'll have to copy the pointer to a CVideoDecoderSettings variable, so you can access the properties of this (I assume) class.

    Hope this helps

    Crazy D

  3. #3

    Thread Starter
    Junior Member
    Join Date
    May 2000
    Posts
    25

    Unhappy

    OK, but how do I actually get a value to be returned from this, and how and where do I actually use the function? Don't I have to use the AddressOf operator,too somewhere?

    Please help

    Thanks,

    Bob

  4. #4

    Thread Starter
    Junior Member
    Join Date
    May 2000
    Posts
    25
    Anyone-
    Got any ideas?
    Please let me know soon.

    Thanks,

    Bob K.

  5. #5
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Rotterdam, Netherlands
    Posts
    386
    I don't know in this specific case, but you'll probably need to call an Init function, probably yuo have to use Addressof there to pass a pointer to the function.
    The function itself must be places in a module.
    Hope this helps

    Crazy D

  6. #6

    Thread Starter
    Junior Member
    Join Date
    May 2000
    Posts
    25

    Thumbs down

    Oh well--
    Thanks anyways.

    I'll can use another function call, and maybe I'll try using the function in a class module to run asynchronously to the program as an activeX DLL or activeX EXE that generates an event in the main program. I think that's about it, though.

    Thanks

    ____

    Bob K.

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