JAZABACHE
Aug 22nd, 2000, 09:33 PM
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
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