11 2012 档案

摘要:#include "stdafx.h"#include <iostream>using namespace std;class MyProblem :public exception{public: MyProblem() { } virtual const char* what() const throw() { return "There are something wrong!\n"; }};int _tmain(int argc, _TCHAR* argv[]) { try { if ("Something wron... 阅读全文
posted @ 2012-11-09 17:22 Ebel 阅读(130) 评论(0) 推荐(0)
摘要:#include "stdafx.h"#include <windows.h>#include <TlHelp32.h>#include <iostream>using namespace std;int _tmain(int argc, _TCHAR* argv[]){ // 给系统所有进程拍一个快照 HANDLE hProcessSnap = ::CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); if (hProcessSnap == INVALID_HANDLE_VALUE) { co 阅读全文
posted @ 2012-11-01 17:32 Ebel 阅读(176) 评论(0) 推荐(0)
摘要:View Code #include "stdafx.h"#include <windows.h>#include <iostream>using namespace std;int _tmain(int argc, _TCHAR* argv[]){ WCHAR szCommandLine[] = _T("notepad.exe "); STARTUPINFO si = {sizeof(si)}; PROCESS_INFORMATION pi; BOOL bRet = ::CreateProcess(NULL, szCommand 阅读全文
posted @ 2012-11-01 16:18 Ebel 阅读(150) 评论(0) 推荐(0)