Hi all,

SE_GetProcAddressForCaller exported by apphelp.dll

Does anybody know what this function does and how it works ? I have googled it extensively but it seems it is not documented.

The only piece of code that I have found is this but it is not clear to me what it does and how it can be useful :

Code:
Option Explicit

Private Declare _
Function SE_GetProcAddressIgnoreIncExc Lib "apphelp.dll" ( _
    ByRef arg1 As Long, _
    ByVal arg2 As LongPtr, _
    ByRef arg3 As String _
) As Long

Private Declare _
Function SE_GetProcAddressForCaller Lib "apphelp.dll" ( _
    ByVal arg1 As Long, _
    ByVal arg2 As Long, _
    ByVal arg3 As Long, _
    ByVal arg4 As Long, _
    ByVal arg5 As Long _
) As Long

Private Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As Long

Sub hoge()

    Dim hDll As Long
    'hDll = GetModuleHandle("user32.dll")
    'Debug.Print hDll

    Dim ptr As Long
    ptr = VBA.CLng(AddressOf func)
    Dim ret As Long
    ret = SE_GetProcAddressForCaller(ptr, 0, 0, 0, 0)
    Debug.Print Hex$(ret), Hex$(ptr)

End Sub

Sub func()
    MsgBox ""
End Sub