}
assertTrue(Kernel32.INSTANCE.CloseHandle(phToken.getValue()));
}
public void testImpersonateLoggedOnUser() {
USER_INFO_1 userInfo = new USER_INFO_1();
userInfo.usri1_name = new WString("JNAAdvapi32TestImp");
userInfo.usri1_password = new WString("!JNAP$$Wrd0");
userInfo.usri1_priv = LMAccess.USER_PRIV_USER;
// ignore test if not able to add user (need to be administrator to do this).
if (LMErr.NERR_Success != Netapi32.INSTANCE.NetUserAdd(null, 1, userInfo, null)) {