我遇到了一个非常神秘的问题。使用函数 GetProcAddress,我总是得到零。
Debug.Print(GetProcAddress(LoadLibraryExA("kernel32"), "CreateProcess"))
无论我使用“CreateProcess”、“LoadLibrary”还是其他东西,这条线总是返回零。为什么会这样?
功能声明:
Declare Function LoadLibraryExA Lib "kernel32" (ByVal name As String) As IntPtr
Declare Ansi Function GetProcAddress Lib "kernel32" (ByVal handle As IntPtr, ByVal name As String) As IntPtr