Results 1 to 2 of 2

Thread: API and VB3

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Location
    Lima - Peru
    Posts
    1

    Exclamation

    Hello,

    Question.

    In Visual Basic 6.0, exist the function: "AddressOf" for get the address of a procedure o function.

    How is your equivalent in VB3. ????
    I NEED THE CODE IN VB3!!!!!!

    I used the GetModuleHandle() and not succes.
    (see example

    '---------
    Declare Function GetProcAddress Lib "kernel" (ByVal hModule As Integer, ByVal lpProcName As String) As Integer

    Declare Function GetModuleHandle Lib "kernel" (ByVal lpModuleName As String) As Integer

    '---------

    Sub Form_Load ()

    Dim int_ExeHandle As Integer
    Dim int_MyFuncAddres As Integer

    int_ExeHandle = GetModuleHandle("PRUEBA1.EXE")
    'int_ExeHandle is Ok >0 )


    int_MyFuncAddres = GetProcAddress(int_ExeHandle, "gf_MyFunction")

    'int_MyFuncAddres = 0!!!!!

    End Sub

    '---
    'PD: "gf_MyFunction" is defined in a module .BAS
    'of my project PRUEBA1.EXE (PRUEBA1.MAK)


    I really appreciatte it if you could help me
    Thank you


    Juan Azabache
    Lima - Peru

  2. #2
    Guest
    AddressOf was incorporated in VB5 I think.

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