标签:ssid word sap api sleep path amp _for return
#include <Windows.h> #include <wchar.h> #include <Psapi.h> #pragma comment(lib, "Psapi.lib") int main() { HWND last_fore = NULL; wchar_t name[MAX_PATH]; DWORD size = MAX_PATH; while(true) { HWND fore = GetForegroundWindow(); if (fore != last_fore) { last_fore = fore; DWORD processid; GetWindowThreadProcessId(fore, &processid); HANDLE process = OpenProcess(PROCESS_QUERY_INFORMATION, NULL, processid); GetProcessImageFileNameW(process, name, size); wprintf(L"%s\n", name); } Sleep(10); } return 0; }
转的nga某位
标签:ssid word sap api sleep path amp _for return
原文地址:http://www.cnblogs.com/yosha/p/6159982.html