摘要:
TRACE("获取系统版本信息------------------------------------------------------\n"); OSVERSIONINFOEX OSVersionInfoEx = {sizeof(OSVERSIONINFOEX)}; GetVersionEx((LPOSVERSIONINFO)&OSVersionInfoEx); TRACE("MajorVersion=%d MinorVersion=%d BuildNumber=%d \n" "PlatformId=%d ServicePackMa 阅读全文
摘要:
// GetEnvironmentVariable // 获取path环境变量的值。 LPTSTR pszValue = NULL; DWORD dwResult = GetEnvironmentVariable(_T("path"), pszValue, 0); if (dwResult != 0) { DWORD dwSize = dwResult * sizeof(TCHAR); pszValue = (LPTSTR)malloc(dwSize); ASSERT(pszValue); GetEnvironmentVariable(_T("path" 阅读全文
摘要:
#include <Windows.h>#include <ShellAPI.h>#include <tchar.h>#include <assert.h>#include <atltrace.h>#define WIN32_LEAN_AND_MEAN#ifdef _DEBUG#pragma comment(lib, "atlsd.lib")#define TRACE ATLTRACE#define ASSERT assert#endif // _DEBUGINT WINAPI _tWinMain( __in HI 阅读全文