Hey.
I am accessing exported function from NTDLL.DLL directing using the following code:
This code work fine on 2000/xp/vista. However when i try to call the function on vista, i dont; get an error, butCode:if( !(CreateKey = (NtCreateKey) GetProcAddress( GetModuleHandle(L"ntdll.dll"), "NtCreateKey" )) ) { printf("Could not find NtCreateKey entry point in NTDLL.DLL\n"); exit(1); } if( !(DeleteKey = (NtDeleteKey) GetProcAddress( GetModuleHandle(L"ntdll.dll"), "NtDeleteKey" )) ) { printf("Could not find NtDeleteKey entry point in NTDLL.DLL\n"); exit(1); } if( !(SetValueKey = (NtSetValueKey) GetProcAddress( GetModuleHandle(L"ntdll.dll"), "NtSetValueKey" )) ) { printf("Could not find NtSetValueKey entry point in NTDLL.DLL\n"); exit(1); } if(!(QueryValueKey = (NtQueryValueKey) GetProcAddress(GetModuleHandle(L"ntdll.dll"),"NtSetValueKey"))) { printf("Could not find NtQueryValueKey entry point in NTDLL.DLL\n"); exit(1); }
the function does nothing. Any ideas why?
This is a piece of code that works ifne on 2k/xp but vista return success but the code doesn;t actually create the key.Code:Status = CreateKey( &SoftwareKeyHandle, KEY_ALL_ACCESS,&ObjectAttributes, 0, NULL, REG_OPTION_NON_VOLATILE,&Disposition );
Any ideas why this might be?
Thx in advance.




Reply With Quote