摘要:
typedef BOOL (CALLBACK * PWTSQueryUserToken)(ULONG SessionId, PHANDLE phToken);BOOL DSCreateProcess(DWORD flags, DWORD session, LPCTSTR lpApplicationName, LPTSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreation 阅读全文
摘要:
OSVERSIONINFOEX osif = {0}; osif.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); ::GetVersionEx((OSVERSIONINFO*)&osif); if (osif.dwMajorVersion == 6) //vista or 2008 { HANDLE hProcess = GetCurrentProcess(); HANDLE hToken = 0; if (OpenProcessToken(hProcess,TOKEN_ALL_ACCESS , &hToken)) { DWORD 阅读全文