08 2012 档案

摘要:#include <Tlhelp32.h>#include <windows.h>#include <iostream>#include <iomanip>#include <map>#include <string>using namespace std;map<DWORD, wstring> GetProcessIdAndName(){ HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL); PROCESSENTRY32 阅读全文
posted @ 2012-08-12 19:42 walfud 阅读(374) 评论(0) 推荐(0) 编辑
摘要:#include <Tlhelp32.h>void ListModule(DWORD pid){ HANDLE processSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pid); MODULEENTRY32 me32; me32.dwSize = sizeof(MODULEENTRY32); if (Module32First(processSnap, &me32)) { do { wcout <<me32.dwSize <<endl; ... 阅读全文
posted @ 2012-08-09 09:14 walfud 阅读(613) 评论(0) 推荐(0) 编辑
摘要:GetWindowsDirectory -> c:\windows or c:\GetTempPath -> CurrentUser::%Tmp% || System::%Tmp% || CurrentUser::%Temp% || System::%Temp%SHGetKnownFolderPathDo Not use environment string for well-known directory any more, use this function instead.#include <shlobj.h>wchar_t *fullp... 阅读全文
posted @ 2012-08-08 16:56 walfud 阅读(325) 评论(0) 推荐(0) 编辑
摘要:PathFindFileNamePathFindFileName(L"c:\\windows"); // windowsPathFindFileName(L"c:\\windows\\"); // windows\PathFindFileName(L"c:"); // c:PathFindFileName(L"c:\\"); // c:\PathFindExtension/* * full path extension * c: * ... 阅读全文
posted @ 2012-08-08 16:40 walfud 阅读(589) 评论(0) 推荐(0) 编辑
摘要:BOOL IsWin7OrLater(){ // Initialization. OSVERSIONINFOEX osVerInfo = {}; osVerInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); osVerInfo.dwMajorVersion = 6; osVerInfo.dwMinorVersion = 1; // Set condition. DWORDLONG conditionMask = 0; int op = VER_GREATER_EQUAL; VER_SET_... 阅读全文
posted @ 2012-08-07 09:41 walfud 阅读(466) 评论(0) 推荐(1) 编辑