是否可以在声明行上更改加载函数名称?
'CreateFileA = CreateFileB
'HANDLE CreateFileA(
' LPCSTR lpFileName,
' DWORD dwDesiredAccess,
' DWORD dwShareMode,
' LPSECURITY_ATTRIBUTES lpSecurityAttributes,
' DWORD dwCreationDisposition,
' DWORD dwFlagsAndAttributes,
' HANDLE hTemplateFile
');
Private Declare PtrSafe Function HP_CRT Lib "KERNEL32" Alias "CreateFileW"(ByVal name As String, ByVal aces As Long, ByVal shar As Long, ByVal satr As LongPtr, ByVal cdep As Long, ByVal fatr As Long, ByVal hand As Long) As LongPtr
到
Function LoadFunction(mode)
return Decrypt(mode)
End Function
Private Declare PtrSafe Function HP_CRT Lib "KERNEL32" Alias LoadFunction("W")(ByVal name As String, ByVal aces As Long, ByVal shar As Long, ByVal satr As LongPtr, ByVal cdep As Long, ByVal fatr As Long, ByVal hand As Long) As LongPtr
或
Private Declare PtrSafe Function HP_CRT Lib "KERNEL32" Alias "---"(ByVal name As String, ByVal aces As Long, ByVal shar As Long, ByVal satr As LongPtr, ByVal cdep As Long, ByVal fatr As Long, ByVal hand As Long) As LongPtr
Sub CreateCase
HP_CRT = GetProcAddress(LoadLibrary("Kernel32"), "CreateFileW")
End Sub
有没有可能?或不可能? 我在Windows 10 RS5上使用MS-Office 2013 x64