Pointer to a Function using the AddressOf Operator
Pointer to a Function using the AddressOf Operator
API Declarations
' Techically pointers don't exist in VB, but there are ways to find an
' address of a function.
' This becomes important when using API's and Callback Procedures
Rate Pointer to a Function using the AddressOf Operator
(1(1 Vote))
Private Function DummyFunc(ByVal lParam As Long) As Long
DummyFunc = lParam
End Function
' A Function....
Private Function MyFunction() As Long
MyFunction = 0
End Function
' This Function will Return the Adrress of 'MyFunction'
Private Function GetAddress() As Long
GetAddress = DummyFunc(AddressOf MyFunction)
End Function
Pointer to a Function using the AddressOf Operator Comments
No comments yet — be the first to post one!
Post a Comment