6 Jun
2011
6 Jun
'11
5:42 p.m.
On 06/06/2011 11:22 AM, Andrew Nguyen wrote:
On 06/06/2011 11:03 AM, Adam Martinson wrote:
+ /* Only check this once */ + if (!cache_lastchecked) + { + HMODULE hadvapi32 = LoadLibraryA("advapi32.dll"); +#define ADVAPI32_GET_PROC(func) typeof(func) * p ## func = (void*)GetProcAddress(hadvapi32, #func) + ADVAPI32_GET_PROC(RegOpenKeyExA); + ADVAPI32_GET_PROC(RegCloseKey); + ADVAPI32_GET_PROC(RegGetValueA); I think you want to use NtCreateKey and NtQueryValueKey instead of dynamically loading advapi32 for registry functionality.
Hmm, ye I think you're right, thanks.