资源简介
(中文版)NSIS安装打包工具--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
代码片段和文件信息
// Exam38.cpp
// 12/29/2000 (rk)
// Modified: 6/16/2003 (rk)
// Test the routine FIND_PROC_BY_NAME to find a running process
#include
#include
#include
int FIND_PROC_BY_NAME(const char *);
int main(int argc char *argv[])
{
// Check whether a process is currently running or not
char szName[100]=“notepad.exe“; // Name of process to find
int iRes;
iRes=FIND_PROC_BY_NAME(szName);
// Note: iRes=0 means process not found =1 means yes it is found in memory
cout << “Result code=“ << iRes << endl;
return 0;
}
int FIND_PROC_BY_NAME(const char *szToFind)
// Created: 12/29/2000 (RK)
// Last modified: 6/16/2003 (RK)
// Please report any problems or bugs to kochhar@physiology.wisc.edu
// The latest version of this routine can be found at:
// http://www.neurophys.wisc.edu/ravi/software/killproc/
// Check whether the process “szToFind“ is currently running in memory
// This works for Win/95/98/ME and also Win/NT/2000/XP
// The process name is case-insensitive i.e. “notepad.exe“ and “NOTEPAD.EXE“
// will both work (for szToFind)
// Return codes are as follows:
// 0 = Process was not found
// 1 = Process was found
// 605 = Unable to search for process
// 606 = Unable to identify system type
// 607 = Unsupported OS
// 632 = Process name is invalid
// Change history:
// 3/10/2002 - Fixed memory leak in some cases (hSnapShot and
// and hSnapShotm were not being closed sometimes)
// 6/13/2003 - Removed iFound (was not being used as pointed out
// by John Emmas)
{
BOOL bResultbResultm;
DWORD aiPID[1000]iCb=1000iNumProciV2000=0;
DWORD iCbneededi;
char szName[MAX_PATH]szToFindUpper[MAX_PATH];
HANDLE hProchSnapShothSnapShotm;
OSVERSIONINFO osvi;
HINSTANCE hInstLib;
int iLeniLenPindx;
HMODULE hMod;
PROCESSENTRY32 procentry;
MODULEENTRY32 modentry;
// PSAPI Function Pointers.
BOOL (WINAPI *lpfEnumProcesses)( DWORD * DWORD cb DWORD * );
BOOL (WINAPI *lpfEnumProcessModules)( HANDLE HMODULE *
DWORD LPDWORD );
DWORD (WINAPI *lpfGetModulebaseName)( HANDLE HMODULE
LPTSTR DWORD );
// ToolHelp Function Pointers.
HANDLE (WINAPI *lpfCreateToolhelp32Snapshot)(DWORDDWORD) ;
BOOL (WINAPI *lpfProcess32First)(HANDLELPPROCESSENTRY32) ;
BOOL (WINAPI *lpfProcess32Next)(HANDLELPPROCESSENTRY32) ;
BOOL (WINAPI *lpfModule32First)(HANDLELPMODULEENTRY32) ;
BOOL (WINAPI *lpfModule32Next)(HANDLELPMODULEENTRY32) ;
// Transfer Process name into “szToFindUpper“ and
// convert it to upper case
iLenP=strlen(szToFind);
if(iLenP<1 || iLenP>MAX_PATH) return 632;
for(indx=0;indx szToFindUpper[indx]=toupper(szToFind[indx]);
szToFindUpper[iLenP]=0;
// First check what version of Windows we‘re in
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
bResult=GetVer
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 8478 2003-06-16 18:56 NSIS安装工具\FindProc\Exam38.cpp
文件 939 2003-12-25 15:44 NSIS安装工具\FindProc\exdll.c
文件 2282 2003-12-25 15:44 NSIS安装工具\FindProc\exdll.h
文件 10249 2004-06-02 19:28 NSIS安装工具\FindProc\FindProcDLL.cpp
文件 31744 2004-06-02 19:31 NSIS安装工具\FindProc\FindProcDLL.dll
文件 4418 2004-06-02 22:28 NSIS安装工具\FindProc\FindProcDLL.dsp
文件 629 2004-06-02 19:31 NSIS安装工具\FindProc\FindProcDLL.dsw
文件 1582 2004-06-02 22:40 NSIS安装工具\FindProc\FindProcDLL.txt
文件 298 2003-12-25 15:44 NSIS安装工具\FindProc\StdAfx.cpp
文件 938 2003-12-25 15:44 NSIS安装工具\FindProc\StdAfx.h
文件 25285 2017-04-14 17:21 NSIS安装工具\FindProc.zip
文件 496640 2009-06-07 00:44 NSIS安装工具\nsis-2.45-log\makensis.exe
文件 38400 2009-06-07 00:44 NSIS安装工具\nsis-2.45-log\Stubs\bzip2
文件 38912 2009-06-07 00:44 NSIS安装工具\nsis-2.45-log\Stubs\bzip2_solid
文件 38400 2009-06-07 00:44 NSIS安装工具\nsis-2.45-log\Stubs\lzma
文件 38400 2009-06-07 00:44 NSIS安装工具\nsis-2.45-log\Stubs\lzma_solid
文件 766 2002-08-02 13:01 NSIS安装工具\nsis-2.45-log\Stubs\uninst
文件 39424 2009-06-07 00:44 NSIS安装工具\nsis-2.45-log\Stubs\zlib
文件 39936 2009-06-07 00:44 NSIS安装工具\nsis-2.45-log\Stubs\zlib_solid
文件 364020 2017-04-14 14:28 NSIS安装工具\nsis-2.45-log.zip
文件 4281602 2017-04-12 15:15 NSIS安装工具\NSISv2452.exe
目录 0 2009-06-07 00:44 NSIS安装工具\nsis-2.45-log\Stubs
目录 0 2017-04-14 17:24 NSIS安装工具\FindProc
目录 0 2017-04-14 17:23 NSIS安装工具\nsis-2.45-log
目录 0 2017-10-17 14:57 NSIS安装工具
----------- --------- ---------- ----- ----
5463342 25
- 上一篇:sar图像配准及变化检测
- 下一篇:2013-2018计算机考研资料考研代码:831
相关资源
- Transistor Circuit Techniques
- nsis-3.04-setup.rar
- Fundamentals of RF and Microwave Transistor Am
- Juniper nsISG2000.6.3.0r25升级包
- NSIS 3.0 .1正式版汉化增强版内含图文教
- Griffiths-IntroductiontoElectrodynamics4thEdit
- NSIS中文手册.chm
- NSIS-中文帮助文档
- 论文研究 - 约旦中部Jurf Ed Darawish地区
- Meso-scale experimental Investigation and stra
- Isolation and characterization of LcSAP a Leym
-
Genome-wide identification and ex
pression a - Genetic diversity of Hirsutella sinensis revea
- NSIS2.46增强版
- nsis进阶教程1~5资源代码合集
- nsis+winCodeSign+nsis-resources.zip
- NSIS NSI源代码 制作JAVA WEB + TOMCAT7
- nsis-3.0.4.1.7z
评论
共有 条评论