windows进程相关函数.doc.pdf

上传人:tbuqq 文档编号:5616459 上传时间:2020-07-02 格式:PDF 页数:7 大小:102.29KB
返回 下载 相关 举报
windows进程相关函数.doc.pdf_第1页
第1页 / 共7页
windows进程相关函数.doc.pdf_第2页
第2页 / 共7页
windows进程相关函数.doc.pdf_第3页
第3页 / 共7页
windows进程相关函数.doc.pdf_第4页
第4页 / 共7页
windows进程相关函数.doc.pdf_第5页
第5页 / 共7页
点击查看更多>>
资源描述

《windows进程相关函数.doc.pdf》由会员分享,可在线阅读,更多相关《windows进程相关函数.doc.pdf(7页珍藏版)》请在三一文库上搜索。

1、1、CancelWaitableTimer这个函数用于取消一个可以等待下去的计时器操作BOOL CancelWaitableTimer ( HANDLE hTimer I I handle to timer ); 2、CallNamedPipe 这个函数由一个希望通过管道通信的一个客户进程调用 BOOL CallNamedPipe( LPCTSTR IpNcimedPipeNcun匕 / pipe name LPVOID bhiBiiffeb DWORD MnBufkrSize、 LPVOID IpO讯Buff帕 DWORD nOiHBuflSSize、 LPDWORD 卩 BpesRecid

2、、 DWORD nTimeOut / write buffer / size of write buffer / read buffer / size of read buffer / number of bytes read / time-out value ); 3、ConnectNamedPipe指示一台服务器等待下去,直至客户机同一个命名管道连接 BOOL ConnectNamedPipe( HANDLE hNamedPipe./ handle to named pipe LPOVERLAPPED / overlapped structure ); 4、CreateEvent 创建一个

3、事件对象 HANDLE CreateEvent( LPSECURITY_ATTRIBUTES IpEventAttributes J! SD BOOL bMcmiuilRes%/ reset type BOOL blnilialState、/ initial state LPCTSTR IpName II object name ); 5、CreateMailslot 创建一个邮路。返回的句柄由邮路服务器使用( 收件人 ) HANDLE CreateMailslot( LPCTSTR IpName/ mailslot name DWORD nMaxMesscigeSize./ maximum

4、message size DWORD IReadTimeouh/ read time-out interval LPSECURITY_ATTRIBUTES lpSec“ityAHribmes / inheritance option ); 6、CreateMutex 创建一个互斥体(MUTEX ) HANDLE CreateMutex( LPSECURITY_ATTRIBUTES M仙 M 加加伽 , / SD BOOL blnitialOwneb/ initial owner LPCTSTR iDNume / object name ); 7、CreateNamedPipe创建一个命名管道。

5、返回的句柄由管道的服务器端使用 HANDLE CreateNamedPipe( LPCTSTR IpName./ pipe name DWORD dwOpenMods/ pipe open mode DWORD dwPipeMod?/ pipe-specific modes DWORD nMaxInstances./ maximum number of instances DWORD nOiuBulTerSize、/ output buffer size DWORD nlnBufferSize、/ input buffer size DWORD nDeJai山TimeOug/ time-out

6、 interval LPSECURITY_ATTRIBUTES iDSecuri心Attributes / SD ); 8、CreatePipe 创建一个匿名管道 BOOL CreatePipe( PHANDLE hReadPipe、/ read handle PHANDLE hWritePipe,/ write handle LPSECURITY.ATTRIBUTES 力加加伽 ,/ security attributes DWORD nSize/ pipe size ); 9、CreateProcess 创建一个新进程(比如执行一个程序) BOOL CreateProcess( LPCTS

7、TR IpApplicciticmNam匕/ name of executable module LPTSTR IpCommandLin匕/ command line string LPSECURITY.ATTRIBUTES IpPgcessAuributes、/ SD LPSECURITY.ATTRIBUTES iDThreadAttdbutes、/ SD BOOL blnheFitHandleSq/ handle inheritance option DWORD dwCreaticmFla 12、DisconnectNamedPipe断开一个客户与一个命名管道的连接 BOOL Discon

8、nectNamedPipe( HANDLE hNamedPiDe / handle to named pipe ); 13、DuplicateHandle 在指出一个现有系统对象当前句柄的情况下, 柄 BOOL DuplicateHandle( HANDLE hSoHFcaPFocessHcmdle、I I handle to source process HANDLE hSouceHandle、/ handle to duplicate HANDLE hTargelPFocessHandle、/ handle to target process ); 14 ExitProcess 中止一个进

9、程 VOID ExitProcess( UINT uExitCode/ exit code for all threads ); 15、FindCloseChangeNotification 关闭一个改动通知对象 BOOL FindCloseChangeNotification( HANDLE hChcingcHandle / handle to change notification ); 16、FindExecutable 查找与一个指定文件关联在一起的程序的文件名 HINSTANCE FindExecutabIe( LPCTSTR lpFile, LPCTSTR lpDirectory,

10、 LPTSTR IpResult ) ; 17、FindFirstChangeNotification创建一个文件通知对象。该对象用于监视文件系统发生的变化 HANDLE FindFirstChangeNotification( LPCTSTR I卩PathNcivne、/ directory name BOOL bWatchSubtre匕 / monitoring option DWORD dwNoHfyFilteF / filter conditions ); 18 FindNextChangeNotification重设一个文件改变通知对象,令其继续监视下一次变化BOOL FindNex

11、tChangeNotification( HANDLE hChcmReHcmdS / handle to change notification ); 19、FreeLibrary 释放指定的动态链接库 BOOL FreeLibrary( HMODULE hModule II handle to DLL module ); 20、GetCurrentProcess获取当前进程的一个伪句柄 HANDLE GetCurrentProcess(VOID); 21 GetCurrentProcessId获取当前进程一个唯一的标识符 DWORD GetCurrentProcessId(VOID); 22

12、 GetCurrentThread获取当前线程的一个伪句柄 HANDLE GetCurrentThread(VOID); 23GetCurrentThreadld获 R 又当前姪程一个唯一的线程标识符 DWORD GetCurrentThreadld(VOID); 24、GetExitCodeProces 获取一个己中断进程的退岀代码 LPEXCEPTION_POINTERS GetExceptionlnformation(VOID); 25、GetExitCodeThread获取一个已中止线程的退出代码 BOOL GetExitCodeThread( HANDLE hThread, / ha

13、ndle to the thread 为那个对象创建一个新句 LPHANDLE IpTargefHcmdle、 DWORD dwDesiredAccess、 BOOL blnherilHandle、 /duplicate handle / requested access / handle inheritance option / optional actions LPDWORD IpExitCode II termination status ); 26 GetHandlelnformation获取与一个系统对象句柄有关的信息 BOOL GetHandleInformation( HANDL

14、E hObject, / handle to object LPDWORD iDdwFlaps / handle properties ); 27、GetMailslotlnfo 获取与一个邮路有关的信息 BOOL GetMailslotInfo( HANDLE hMailslot. / mailslot handle LPDWORD IpMaxMessa胱Size、/ maximum message size LPDWORD IpNexlSize、/ size of next message LPDWORD IpMessu父eCount、/ number of messages LPDWOR

15、D IpReadTimeom/ read time-out interval ); 28、GetModuleFileName获取一个已装载模板的完整路径名称 DWORD GetModuleFileNanie( HMODULE hModule / handle to module LPTSTR IpFibHam匕 / file name of module DWORD nSize/ size of buffer ); 29、GetModuleHandle 获取一个应用程序或动态链接库的模块句柄 HMODULE GetModuleHandle( LPCTSTR IpModuleName 11 mo

16、dule name ); 30GetPriorityClass获取特定进程的优先级别 DWORD GetPriorityClass( HANDLE hProcess II handle to process ); 31 GetProcessShutdownParameters调查系统关闭时一个指定的进程相对于其它进程的关闭早 迟情况 BOOL GetProcessShutdovvnParameters( LPDWORD IpdwLevelJ! shutdown priority LPDWORD IpdwFkips / shutdown flag ); 32、GetProcessTimes获取与

17、一个进程的经过时间有关的信息 BOOL GetProcessTimes( HANDLE hProcess,/ handle to process LPFILETIME TimeI process creation time LPFILETIME IpExilTim匕/ process exit time LPFILETIME IpKemelTime, II process kernel-mode time LPFILETIME IpUserTime / process user-mode time ); 33 GetProcessWorkingSetSize 了解一个应用程序在运行过程中实际向

18、它交付了多大容量的内 存 BOOL GetProcessWorkingSetSize( HANDLE hProcess/ handle to the process PSIZE_T IpMinimiunWorkingSefSizeJI minimum working set size PSIZE_T iDMaximiimWoFkiH父SelSizw / maximum working set size ); 34 GetThreadPriority获取特定线程的优先级别 int GetThreadPriority( HANDLE hThread / handle to thread ); Me

19、aning Indicates 1 point above normal priority for the priority class. Indicates 1 point below normal priority for the priority class. Indicates 2 points above normal priority for the priority class. Indicates a base-priority level of 1 for IDLE_PRIORITY_CLASS, BELOW_NORMAL_PRIORITY_CLASS, NORMAL_PRI

20、ORITY_CLASS, ABOVE_NORMAL_PRIOR1TY_CLASS, or HIGH_PRIORITY_CLASS processes, and a base-priority level of 16 for REALTIME_PRIORITY_CLASS processes. Indicates 2 points below normal priority for the priority class. Indicates normal priority for the priority class. Indicates a base-priority level of 15

21、for IDLE_PRIORITY_CLASS, BELOW_NORMAL_PRIORITY_CLASS, N0RMAL_PR10RITY_CLASS, ABOVE_NORMAL_PRIORITY_CLASS, or HIGH_PRIORITY_CLASS processes, and a base-priority level of 31 forREALTIME_PRIORITY_CLASS processes. 35、GetWindowThreadProcessId获取与指定窗口关联在一起的一个进程和线程标识符 DWORD GetWindowThreadProcessId( HWND hW

22、ndy / handle to window LPDWORD Ipdw Process Id / process identifier ); 36、LoadLibrary 载入指定的动态链接库,并将它映射到当前进程使用的地址空间 HMODULE LoadLibrary( LPCTSTR IpFileName/ file name of module ); 37、LoadLibraryEx 装载指定的动态链接库,并为当前进程把它映射到地址空间 HMODULE LoadLibraryEx( LPCTSTR IpFileName、/ file name of module HANDLE hFiley

23、 II reserved, must be NULL DWORD dwFk圾s II entry-point execution option ); 38、LoadModule 载入一个 Windows 应用程序,并在指定的环境中运行 DWORD LoadModule( LPCSTR iDModulwNam匕 / file name of application LPVOID IpPammelerBlock / parameter block ); 39、MsgWaitForMultipleObjects等侯单个对象或一系列对彖发出信号。如返回条件已经满足, 则立即返回 Priority TH

24、READ_PRIORITY_ABO VE_NORMAL THREAD_PRIORITY_BEL OW_NORMAL THREAD_PRIORITY_HIG HEST THREAD_PRIORITY_IDLE THREAD_PRIORITY_LOW EST THREAD_PRIORITY_NOR MAL THREAD_PRIORITY_TIM E_CRITICAL DWORD MsgVVaitForMultipleObjects( DWORD nCounty/ number of handles in array CONST HANDL Handles J! object-handle arra

25、y BOOL fWaitAlk/ wait option DWORD dwMilliseconds. H time-out interval DWORD dwWakeMask 11 input-event type ); 40 SetPriorityClass设置一个进程的优先级别 BOOL SetPriorityClass( HANDLE hProcesSy/ handle to process DWORD dwPrioriryClass / priority class ); 41、SetProcessShutdownParameters在系统关闭期间,为指定进程设置他相对于其它程序的 关

26、闭顺序 BOOL SetProcessShutdownParameters( DWORD dwLeveh / shutdown priority DWORD dwFlags / shutdown options ); 42SetProcessWorkingSetSize设置操作系统实际划分给进程使用的内存容量 BOOL SetProcessWorkingSetSize( HANDLE hProcesSy/ handle to process SIZE_T dwMininuMWorkin父SelSize、II minimum working set size SIZE_T dwMaximumWo

27、rkingSefSize / maximum working set size ); 43、 SetThreadPriority 设足线程的优先级别 BOOL SetThreadPriority( HANDLE hThreadJ! handle to the thread int nPrioriw I I thread priority level ); 44、 ShellExecute 查找与指定文件关联在一起的程序的文件名 HINSTANCE ShellExecute( HWND hvvnd, LPCTSTR IpVerb, LPCTSTR IpFile, LPCTSTR IpParameters, LPCTSTR IpDirectory, INT nShowCmd ); 45TerminateProcess 结束一个进程 BOOL TerminateProcessf HANDLE hProcessJ! handle to the process UINT itExifCode II exit code for the process ); 46、WinExec 运行指定的程序 UINT WinExec( LPCSTR IpCmdLine、/ command line UINT uCmdShow / window style );

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 其他


经营许可证编号:宁ICP备18001539号-1