public static void main(String[] args) {
junit.textui.TestRunner.run(NtDllUtilTest.class);
}
public void testGetKeyName() {
HKEYByReference phKey = new HKEYByReference();
assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegOpenKeyEx(
WinReg.HKEY_CURRENT_USER, "Software", 0, WinNT.KEY_WRITE | WinNT.KEY_READ, phKey));
assertEquals("Software", NtDllUtil.getKeyName(phKey.getValue()));
assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegCloseKey(phKey.getValue()));
}