你试试下面的步骤,我没有做过:
1. OpenDesktop( "default",... )
2. GetUserObjectInformation(...,UOI_USER_SID,...)
3. LookupAccountSidgood luck
1. OpenDesktop( "default",... )
2. GetUserObjectInformation(...,UOI_USER_SID,...)
3. LookupAccountSidgood luck
GetUserObjectInformation ONLY support NT based system
9X not support.
No information about ME.hao to implement in 9X
意思是如果运行在9X下又该如何得到当前登陆账号?GetUserObjectInformation(hDesk,UOI_USER_SID,cbSID,128,&UserNameLen);
得不到SID,返回的UserNameLen也是0
是不是因为程序运行于LocalSystem账号下?
那该怎么办啊。
急求教!!!
你的方法不行,我只得到hDesktop句柄,但是获取句柄用户信息失败。试过通过注册表HKEY_LOCAL_MATHINE\......,还是不成功