Results 1 to 7 of 7

Thread: AddressOf operator

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 1999
    Location
    Reynosa, Mexico
    Posts
    274

    Post

    How can I implement an AddressOf functionallity into my ActiveX DLL?

    Thanks!

  2. #2
    Member
    Join Date
    Jan 1999
    Location
    Longmont,CO
    Posts
    53

    Post

    AddressOf is used to pass the address of a function to a Win32 DLL. The function must be in a bas module. Check out the examples here on subclassing to see the operator in action.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    May 1999
    Location
    Reynosa, Mexico
    Posts
    274

    Post

    I know what it is. I want to know HOW to code or implement the functionallity of this operator into my own ActiveX DLL.

  4. #4
    Member
    Join Date
    Jan 1999
    Location
    Longmont,CO
    Posts
    53

    Post

    There's no one use for the operator. You'll have to be more specific as to what you're trying to do.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    May 1999
    Location
    Reynosa, Mexico
    Posts
    274

    Post

    The AddressOf operator must bo in the call statment. For example:

    Call MyProc(x, AddressOf XProc)

    Where MyProc is the procedure into the ActiveX DLL and Xproc is the procedure to execute from within the MyProc.

    What do I need to put into the MyProc procedure to perform this funtionality (that call the XProc procedure)? I supouse I need to write some code to MyProc be able to execute the AddressOf functionallity.

    Do you underestand? Sorry by my short and bad English.

    Thanks!

    [This message has been edited by Tonatiuh (edited 01-18-2000).]

  6. #6
    Member
    Join Date
    Jan 1999
    Location
    Longmont,CO
    Posts
    53

    Post

    You can't use the opertor that way. The only way you can pass addresses of functions is when you pass them from VB to Windows. You can't pass the address of a function to a VB ActiveX DLL.

  7. #7
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Rotterdam, Netherlands
    Posts
    386

    Post

    Well you can pass the adress of a function to your dll but you can't call it from your dll...
    If you want to call an API which wants a callback (subclass), you'll need to do a little more since every instance of your dll will use the function, but basically, add a module to the activex dll, there you need to put it the public function of which you want to pass the adres of to a function.
    What are you trying to do?

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