JustAMan / pyWinClobber

A set of Python scripts to clobber some free space out of Windows installations. Use at your own risk!
MIT License
59 stars 10 forks source link

OpenProcessToken should be from advapi32 rather than kernel32 #10

Open arafangion opened 9 years ago

arafangion commented 9 years ago

While this works in Windows 10, it isn't documented as belonging to kernel32.

The documentation says that this function lives in advapi32, so if you need to use this code on windows Vista, for instance, then you will need to correct this.

Additionally, as a stylistic issue, I would suggest consistently using the lowercase form for 'kernel32' and 'advapi32', rather than 'kernel32' and 'Advapi32'.

Please refer to https://msdn.microsoft.com/en-us/library/windows/desktop/aa379295%28v=vs.85%29.aspx