VBA: возможно ли en / декодировать псевдоним функции имени (псевдоним "CreateFileW" -> Alias ​​Enc (182893)) - PullRequest
0 голосов
/ 18 марта 2019

Можно ли изменить имя функции загрузки в строке объявления?

'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

Есть ли возможность? или невозможно? Я использую MS-Office 2013 x64 на Windows 10 RS5

...