2009年3月29日
摘要:
#include<stdio.h>#include<windows.h>void GetSysInfo();DWORD GetOS() { OSVERSIONINFO os; os.dwOSVersionInfoSize=sizeof(OSVERSIONINFO); GetVersionEx(&os); switch(os.dwPlatformId) { case VER_PLATFORM_WIN32_WINDOWS: return VER_PLATFORM_WIN32_WINDOWS; case VER_PLATFORM_WIN32_NT: return VE 阅读全文
摘要:
#include <stdio.h>#include <windows.h>SERVICE_STATUS m_ServiceStatus;SERVICE_STATUS_HANDLE m_ServiceStatusHandle;BOOL bRunning=true;void WINAPI ServiceMain(DWORD argc, LPTSTR *argv);//服务主函数void WINAPI ServiceCtrlHandler(DWORD Opcode);//服务控制函数void WINAPI CmdStart(void);//要启动的程序函数BOOL Inst 阅读全文
摘要:
void pslist(void){HANDLE hProcessSnap = NULL;PROCESSENTRY32 pe32= {0};hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);if (hProcessSnap == (HANDLE)-1){printf("/nCreateToolhelp32Snapshot() failed:%d",GetLastError());return ;}pe32.dwSize = sizeof(PROCESSENTRY32);printf("/n 阅读全文