windows下获得当前用户名的小代码,ring3级别
摘要:
#include #include #pragma comment(lib, "WtsApi32.lib")#define Message(X) MessageBox(0, X, "DEBUG", MB_ICONINFORMATION)int getUserName(char *username){ LPTSTR pBuffer = NULL; DWORD dwBufferLen; BOOL bRes = WTSQuerySessionInformation(WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION, 阅读全文
posted @ 2013-06-26 16:37 aitilang 阅读(303) 评论(0) 推荐(0) 编辑