|
9 | 9 | #define MEMORY_FEATURE_LDRP_RELEASE_TLS_ENTRY 0x00000040 |
10 | 10 | #define MEMORY_FEATURE_ALL 0x0000007f |
11 | 11 |
|
12 | | -//Get the implementation of the currently running operating system. |
13 | | -NTSTATUS NTAPI LdrQuerySystemMemoryModuleFeatures(_Out_ PDWORD pFeatures); |
14 | | - |
15 | 12 |
|
16 | 13 | /* |
17 | 14 | LdrLoadDllMemoryEx dwFlags |
@@ -47,21 +44,24 @@ NTSTATUS NTAPI LdrQuerySystemMemoryModuleFeatures(_Out_ PDWORD pFeatures); |
47 | 44 | //Hook for dotnet dlls |
48 | 45 | #define LOAD_FLAGS_HOOK_DOT_NET 0x00000010 |
49 | 46 |
|
| 47 | +extern "C" { |
50 | 48 |
|
51 | | -NTSTATUS NTAPI LdrLoadDllMemoryExW( |
52 | | - _Out_ HMEMORYMODULE* BaseAddress, // Output module base address |
53 | | - _Out_opt_ PVOID* LdrEntry, // Receive a pointer to the LDR node of the module |
54 | | - _In_ DWORD dwFlags, // Flags |
55 | | - _In_ LPVOID BufferAddress, // Pointer to the dll file data buffer |
56 | | - _In_ size_t Reserved, // Reserved parameter, must be 0 |
57 | | - _In_opt_ LPCWSTR DllName, // Module file name |
58 | | - _In_opt_ LPCWSTR DllFullName // Module file full path |
59 | | -); |
| 49 | + //Get the implementation of the currently running operating system. |
| 50 | + NTSTATUS NTAPI LdrQuerySystemMemoryModuleFeatures(_Out_ PDWORD pFeatures); |
| 51 | + |
| 52 | + NTSTATUS NTAPI LdrLoadDllMemoryExW( |
| 53 | + _Out_ HMEMORYMODULE* BaseAddress, // Output module base address |
| 54 | + _Out_opt_ PVOID* LdrEntry, // Receive a pointer to the LDR node of the module |
| 55 | + _In_ DWORD dwFlags, // Flags |
| 56 | + _In_ LPVOID BufferAddress, // Pointer to the dll file data buffer |
| 57 | + _In_ size_t Reserved, // Reserved parameter, must be 0 |
| 58 | + _In_opt_ LPCWSTR DllName, // Module file name |
| 59 | + _In_opt_ LPCWSTR DllFullName // Module file full path |
| 60 | + ); |
60 | 61 |
|
61 | | -//Unload modules previously loaded from memory |
62 | | -NTSTATUS NTAPI LdrUnloadDllMemory(_In_ HMEMORYMODULE BaseAddress); |
| 62 | + //Unload modules previously loaded from memory |
| 63 | + NTSTATUS NTAPI LdrUnloadDllMemory(_In_ HMEMORYMODULE BaseAddress); |
63 | 64 |
|
64 | | -extern "C" { |
65 | 65 | __declspec(noreturn) VOID NTAPI LdrUnloadDllMemoryAndExitThread( |
66 | 66 | _In_ HMEMORYMODULE BaseAddress, |
67 | 67 | _In_ DWORD dwExitCode |
|
0 commit comments