std.widows.registry

Kai Meyer kai at gnukai.com
Wed Aug 22 07:51:58 PDT 2012


If I try to modify a registry value with 'key.setValue()', I get 
an error 5, which I think is ERROR_ACCESS_DENIED. Even if I right 
click my .exe and choose 'run as Administrator'. I am on Windows 
7 x64, and dmd 2.060. From my research, I think I have to modify 
my privilege tokens:

http://msdn.microsoft.com/en-us/library/windows/desktop/aa387705%28v=vs.85%29.aspx

But this example calls methods in advapi that I can't find any 
bindings for in the D source, namely:
     OpenProcessToken
     LookupPrivilegeValueW
     AdjustTokenPrivileges

Any ideas?


More information about the Digitalmars-d-learn mailing list