-
MFC创建进程、打开进程、终止进程
资源描述
创建进程、打开进程、终止进程
*两个函数 CreateProcess、openProcess、TerminateProcess
*获得进程句柄
*获得进程号
*提升进程权限
*Microsoft Spy++
操作平台:win10+vs2013 pro
操作步骤:
1、创建进程
PROCESS_INFORMATION pi;//进程信息结构
STARTUPINFO si;//启动信息结构
memset(&si, 0, sizeof(si));
si.cb = sizeof(si);
si.wShowWindow = SW_SHOW;
si.dwFlags = STARTF_USESHOWWINDOW;
TCHAR szPath[] = TEXT("c:windowssystem32
otepad.exe E:c++MFCa.txt");
BOOL bRet = ::CreateProcess(NULL, szPath, NULL, FALSE, NULL, NULL, NULL, NULL, &si, &pi);
int error = GetLastError();
if (bRet)
{
::CloseHandle(pi.hThread);
::CloseHandle(pi.hProcess);
AfxMessageBox(TEXT("创建进程成功"));
}
else
{
AfxMessageBox(TEXT("创建进程失败"));
}
2、打开进程
DWORD pid;
//若有指定窗口类和窗口名称则表示成功返回一个窗口的句柄
HWND hCalc = ::FindWindow(TEXT("Note
- 2022-03-25 15:36:01下载
- 积分:1
-
动态增加状态条及其他控件
动态增加状态条及其他控件-dynamic increase of the state and other controls
- 2022-03-24 23:51:09下载
- 积分:1
-
A cool calendar control, schedule management spirit likeness outlook. Can make n...
一个很酷的日历控件,神似outlook的日程管理。可以做记事本便签等。这个控件(VC的源码)winner in Competition "MFC/C++ Jul 2005"。算得上codeproject的一个精品。特此与大家分享。-A cool calendar control, schedule management spirit likeness outlook. Can make notes, such as Notepad. The control (VC source) winner in Competition
- 2022-08-24 06:38:34下载
- 积分:1
-
上传源代码的体系结构分析
The password is "thisisninebullssrc"
上传源代码的体系结构分析
The password is "thisisninebullssrc"-Stock analysis soft
- 2022-03-16 15:13:17下载
- 积分:1
-
Qt5开发与实例代码
是一本初学者的好资源希望有帮助
- 2022-01-31 04:40:46下载
- 积分:1
-
VB6 can be completed to achieve the WindowsHwnd all the features SPY detailed lo...
VB6的 WindowsHwnd 实现可以完成SPY的所有功能 详细请自己看代码-VB6 can be completed to achieve the WindowsHwnd all the features SPY detailed look at your own code
- 2022-04-11 18:22:16下载
- 积分:1
-
自动纪录历史的组合框
这个聪明的组合框具有IE那样的自动纪录历史的功能,你最近使用过的文件它会个个记在帐上。需要设计
History功能的朋友赶快...
自动纪录历史的组合框
这个聪明的组合框具有IE那样的自动纪录历史的功能,你最近使用过的文件它会个个记在帐上。需要设计
History功能的朋友赶快下载吧!
-automatically record the history of the smart combination box frame with a combination of IE automatically as a function of historical records, you have recently used it in the paper each recorded in the accounts. History functional design needs friends quickly download!
- 2022-04-08 17:33:09下载
- 积分:1
-
一个用delphi写的可以简单显示数值曲线的程序,可以作为软件示波器、用描点法绘出曲线的基础开发。...
一个用delphi写的可以简单显示数值曲线的程序,可以作为软件示波器、用描点法绘出曲线的基础开发。-A delphi written using a simple numerical curves show that the procedure can serve as a software oscilloscope with a scanning method to map the basis of the development curve.
- 2022-01-25 18:06:35下载
- 积分:1
-
CatListBox_src.zip
CatListBox_demo.zip
这个程序模仿Outlook建立分类列表框。
CClockST...
CatListBox_src.zip
CatListBox_demo.zip
这个程序模仿Outlook建立分类列表框。
CClockST_src.zip
CClockST_demo.zip
一个简单的数字时钟程序,其中的date类派生于MFC CStatic 基类。
CIVStringSet_Demo.zip
CIVStringSet_Source.zip
基于MFC和STL平台的字符串类,可以实现在快速字符串搜索。
enum_display_modes_demo.zip
enum_display_modes_src.zip
列出所有的显示模式并列表出来,通过单击列表来改变显示分辨率。
iconbutton_demo.zip
iconbutton_src.zip
创建一个按钮,并在上面显示图标。
jpeglib_demo.zip
jpeglib_src.zip
利用Delphi的代码在VC中显示JPG图片,不使用动态连接库。
Mail_Report.zip
一个邮件报告程序。
SrcFirstProg.zip
解释了最基本的MFC程序流程。
tabcontrol_demo.zip
tabcontrol_src.zip
自定义的标签控件对话框。
Undo_demo.zip
undo_src.zip
在VC中实现Undo和Redo功能。-err
- 2022-01-26 05:12:12下载
- 积分:1
-
VC++ Tab Control example. CTabSheet a simple example. VS 2005 C++ MFC Dialog rou...
VC++ Tab Control实例。CTabSheet简例。VS 2005 C++ MFC Dialog例程-VC++ Tab Control example. CTabSheet a simple example. VS 2005 C++ MFC Dialog routines
- 2022-01-26 00:30:53下载
- 积分:1