SOT:用SetThreaDesktop关联当前用户桌面
(发表于2003-5-26 10:42:00)
leecyi:void ShowUserDomain(void)
{
HANDLE hProcess, hAccessToken;
TCHAR InfoBuffer[1000],szAccountName[200], szDomainName[200];
PTOKEN_USER pTokenUser = (PTOKEN_USER)InfoBuffer;
DWORD dwInfoBufferSize,dwAccountSize = 200, dwDomainSize = 200;
SID_NAME_USE snu;
hProcess = GetCurrentProcess();
OpenProcessToken(hProcess,TOKEN_READ,&hAccessToken);
GetTokenInformation(hAccessToken,TokenUser,InfoBuffer,
1000, &dwInfoBufferSize);
LookupAccountSid(NULL, pTokenUser->User.Sid, szAccountName,
&dwAccountSize,szDomainName, &dwDomainSize, &snu);
printf("%s\\%s\n",szDomainName,szAccountName);
}
(发表于2003-6-3 14:26:00)
eastdragon:DWORD cchUser;
DWORD cchDomain;
改为:
DWORD cchUser[UNLEN+1];
DWORD cchDomain[DNLEN+1];
(发表于2003-6-11 15:46:00)
ok1385:我一直对获取系统信息很有兴趣,但是对获取系统服务信息和获取系统安装软件及更新程序却不知道怎么下手,能指点一二吗?
(发表于2006-6-9 11:12:00)
..........................................................................
--------------------next---------------------