current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list.

Check this void main() { DWORD dwSessionId; HANDLE hToken = NULL; TOKEN_PRIVILEGES tp; PROCESS_INFORMATION pi; STARTUPINFOW si; // Initialize structures. ZeroMemory(&tp, sizeof(tp)); ZeroMemory(&pi, sizeof(pi)); ZeroMemory(&si, sizeof(si)); si.cb = sizeof(si); LPTSTR lpszUsername = "user\0"; LPTSTR lpszDomain = ".";//"bgt\0"; LPTSTR lpszPassword = "password\0"; if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES , &hToken)) { MyError(); }

© Copyright 2017 umikey.com. All rights reserved.