Hey.
I am accessing exported function from NTDLL.DLL directing using the following code:
Code:
	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);
	}
This code work fine on 2000/xp/vista. However when i try to call the function on vista, i dont; get an error, but
the function does nothing. Any ideas why?
Code:
	Status = CreateKey( &SoftwareKeyHandle, KEY_ALL_ACCESS,&ObjectAttributes, 0,  NULL, REG_OPTION_NON_VOLATILE,&Disposition );
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.
Any ideas why this might be?
Thx in advance.