Results 1 to 2 of 2

Thread: Calling a Procedure by its Win32 Pointer

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Location
    Toronto, Ontario
    Posts
    280

    Calling a Procedure by its Win32 Pointer

    How can I write a win32 dll file in TASM 5 which has procs in it that can be called from VB6 that will call a sub by the address passed to it (like from an OpenGl extension)

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Your functions must heed the stdcall (pascal) calling convention:

    The parameters are passed from left to right. Number of bytes in the parameters is fixed. The called function is responsible for clearing the stack (using the ret n instruction).

    Use the call instruction to call the callback.

    The rest is about linker options.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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