LdrLoadDll Crash
LdrLoadDll Crash I need to load a library via ntdll's LdrLoadDll function, in this case the library I am loading is user32.dll. However, when I try to load user32.dll, an access violation exception is thrown on the call(last line). I am unsure what the cause of this error could be. Am I creating the unicode string incorrectly? LdrLoadDll typedef (__stdcall *LdrLoadDll)( IN PWCHAR PathToFile OPTIONAL, IN ULONG Flags OPTIONAL, IN PUNICODE_STRING ModuleFileName, OUT PHANDLE ModuleHandle); LdrLoadDll LdrLoadDllStruct = (LdrLoadDll)GetProcAddress(ntdllHandle, "LdrLoadDll"); typedef (__stdcall *RtlInitUnicodeString)( PUNICODE_STRING DestinationString, PCWSTR SourceString); RtlInitUnicodeString RtlInitUnicodeStringStruct = (RtlInitUnicodeString)GetProcAddress(ntdllHandle, "RtlInitUnicodeString"); HMODULE hModule = 0; UNICODE_STRING unicodestring; RtlInitUnicodeStringStruct(&unicodestrin...