windows进程相关函数.doc_第1页
windows进程相关函数.doc_第2页
windows进程相关函数.doc_第3页
windows进程相关函数.doc_第4页
windows进程相关函数.doc_第5页
已阅读5页,还剩2页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、CancelWaitableTimer 这个函数用于取消一个可以等待下去的计时器操作BOOL CancelWaitableTimer( HANDLE hTimer / handle to timer);2、CallNamedPipe 这个函数由一个希望通过管道通信的一个客户进程调用BOOL CallNamedPipe( LPCTSTR lpNamedPipeName, / pipe name LPVOID lpInBuffer, / write buffer DWORD nInBufferSize, / size of write buffer LPVOID lpOutBuffer, / read buffer DWORD nOutBufferSize, / size of read buffer LPDWORD lpBytesRead, / number of bytes read DWORD nTimeOut / time-out value);3、ConnectNamedPipe 指示一台服务器等待下去,直至客户机同一个命名管道连接BOOL ConnectNamedPipe( HANDLE hNamedPipe, / handle to named pipe LPOVERLAPPED lpOverlapped / overlapped structure);4、CreateEvent 创建一个事件对象HANDLE CreateEvent( LPSECURITY_ATTRIBUTES lpEventAttributes,/ SD BOOL bManualReset, / reset type BOOL bInitialState, / initial state LPCTSTR lpName / object name);5、CreateMailslot 创建一个邮路。返回的句柄由邮路服务器使用(收件人)HANDLE CreateMailslot( LPCTSTR lpName, / mailslot name DWORD nMaxMessageSize, / maximum message size DWORD lReadTimeout, / read time-out interval LPSECURITY_ATTRIBUTES lpSecurityAttributes / inheritance option);6、CreateMutex 创建一个互斥体(MUTEX)HANDLE CreateMutex( LPSECURITY_ATTRIBUTES lpMutexAttributes, / SD BOOL bInitialOwner, / initial owner LPCTSTR lpName / object name);7、CreateNamedPipe 创建一个命名管道。返回的句柄由管道的服务器端使用HANDLE CreateNamedPipe( LPCTSTR lpName, / pipe name DWORD dwOpenMode, / pipe open mode DWORD dwPipeMode, / pipe-specific modes DWORD nMaxInstances, / maximum number of instances DWORD nOutBufferSize, / output buffer size DWORD nInBufferSize, / input buffer size DWORD nDefaultTimeOut, / time-out interval LPSECURITY_ATTRIBUTES lpSecurityAttributes / SD);8、CreatePipe 创建一个匿名管道BOOL CreatePipe( PHANDLE hReadPipe, / read handle PHANDLE hWritePipe, / write handle LPSECURITY_ATTRIBUTES lpPipeAttributes, / security attributes DWORD nSize / pipe size);9、CreateProcess 创建一个新进程(比如执行一个程序)BOOL CreateProcess( LPCTSTR lpApplicationName, / name of executable module LPTSTR lpCommandLine, / command line string LPSECURITY_ATTRIBUTES lpProcessAttributes, / SD LPSECURITY_ATTRIBUTES lpThreadAttributes, / SD BOOL bInheritHandles, / handle inheritance option DWORD dwCreationFlags, / creation flags LPVOID lpEnvironment, / new environment block LPCTSTR lpCurrentDirectory, / current directory name LPSTARTUPINFO lpStartupInfo, / startup information LPPROCESS_INFORMATION lpProcessInformation / process information);10、 CreateSemaphore 创建一个新的信号机HANDLE CreateSemaphore( LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,/ SD LONG lInitialCount, / initial count LONG lMaximumCount, / maximum count LPCTSTR lpName / object name);11、CreateWaitableTimer 创建一个可等待的计时器对象HANDLE CreateWaitableTimer( LPSECURITY_ATTRIBUTES lpTimerAttributes,/ SD BOOL bManualReset, / reset type LPCTSTR lpTimerName / object name);12、DisconnectNamedPipe 断开一个客户与一个命名管道的连接BOOL DisconnectNamedPipe( HANDLE hNamedPipe / handle to named pipe);13、 DuplicateHandle 在指出一个现有系统对象当前句柄的情况下,为那个对象创建一个新句柄BOOL DuplicateHandle( HANDLE hSourceProcessHandle, / handle to source process HANDLE hSourceHandle, / handle to duplicate HANDLE hTargetProcessHandle, / handle to target process LPHANDLE lpTargetHandle, / duplicate handle DWORD dwDesiredAccess, / requested access BOOL bInheritHandle, / handle inheritance option DWORD dwOptions / optional actions);14、ExitProcess 中止一个进程VOID ExitProcess( UINT uExitCode / exit code for all threads);15、FindCloseChangeNotification 关闭一个改动通知对象BOOL FindCloseChangeNotification( HANDLE hChangeHandle / handle to change notification);16、FindExecutable 查找与一个指定文件关联在一起的程序的文件名HINSTANCE FindExecutable( LPCTSTR lpFile, LPCTSTR lpDirectory, LPTSTR lpResult);17、 FindFirstChangeNotification 创建一个文件通知对象。该对象用于监视文件系统发生的变化 HANDLE FindFirstChangeNotification( LPCTSTR lpPathName, / directory name BOOL bWatchSubtree, / monitoring option DWORD dwNotifyFilter / filter conditions);18、FindNextChangeNotification 重设一个文件改变通知对象,令其继续监视下一次变化BOOL FindNextChangeNotification( HANDLE hChangeHandle / handle to change notification);19、FreeLibrary 释放指定的动态链接库BOOL FreeLibrary( HMODULE hModule / handle to DLL module);20、GetCurrentProcess 获取当前进程的一个伪句柄HANDLE GetCurrentProcess(VOID);21、GetCurrentProcessId 获取当前进程一个唯一的标识符DWORD GetCurrentProcessId(VOID);22、GetCurrentThread 获取当前线程的一个伪句柄HANDLE GetCurrentThread(VOID);23、GetCurrentThreadId 获取当前线程一个唯一的线程标识符DWORD GetCurrentThreadId(VOID);24、GetExitCodeProces 获取一个已中断进程的退出代码LPEXCEPTION_POINTERS GetExceptionInformation(VOID);25、GetExitCodeThread 获取一个已中止线程的退出代码BOOL GetExitCodeThread( HANDLE hThread, / handle to the thread LPDWORD lpExitCode / termination status);26、GetHandleInformation 获取与一个系统对象句柄有关的信息BOOL GetHandleInformation( HANDLE hObject, / handle to object LPDWORD lpdwFlags / handle properties);27、GetMailslotInfo 获取与一个邮路有关的信息BOOL GetMailslotInfo( HANDLE hMailslot, / mailslot handle LPDWORD lpMaxMessageSize, / maximum message size LPDWORD lpNextSize, / size of next message LPDWORD lpMessageCount, / number of messages LPDWORD lpReadTimeout / read time-out interval);28、GetModuleFileName 获取一个已装载模板的完整路径名称DWORD GetModuleFileName( HMODULE hModule, / handle to module LPTSTR lpFilename, / file name of module DWORD nSize / size of buffer);29、GetModuleHandle 获取一个应用程序或动态链接库的模块句柄HMODULE GetModuleHandle( LPCTSTR lpModuleName / module name);30、GetPriorityClass 获取特定进程的优先级别DWORD GetPriorityClass( HANDLE hProcess / handle to process);31、 GetProcessShutdownParameters 调查系统关闭时一个指定的进程相对于其它进程的关闭早迟情况BOOL GetProcessShutdownParameters( LPDWORD lpdwLevel,/ shutdown priority LPDWORD lpdwFlags / shutdown flag);32、GetProcessTimes 获取与一个进程的经过时间有关的信息BOOL GetProcessTimes( HANDLE hProcess, / handle to process LPFILETIME lpCreationTime,/ process creation time LPFILETIME lpExitTime, / process exit time LPFILETIME lpKernelTime, / process kernel-mode time LPFILETIME lpUserTime / process user-mode time);33、GetProcessWorkingSetSize 了解一个应用程序在运行过程中实际向它交付了多大容量的内存BOOL GetProcessWorkingSetSize( HANDLE hProcess, / handle to the process PSIZE_T lpMinimumWorkingSetSize,/ minimum working set size PSIZE_T lpMaximumWorkingSetSize / maximum working set size);34、GetThreadPriority 获取特定线程的优先级别int GetThreadPriority( HANDLE hThread / handle to thread);PriorityMeaningTHREAD_PRIORITY_ABOVE_NORMALIndicates 1 point above normal priority for the priority class.THREAD_PRIORITY_BELOW_NORMALIndicates 1 point below normal priority for the priority class.THREAD_PRIORITY_HIGHESTIndicates 2 points above normal priority for the priority class.THREAD_PRIORITY_IDLEIndicates a base-priority level of 1 for IDLE_PRIORITY_CLASS, BELOW_NORMAL_PRIORITY_CLASS, NORMAL_PRIORITY_CLASS, ABOVE_NORMAL_PRIORITY_CLASS, or HIGH_PRIORITY_CLASS processes, and a base-priority level of 16 for REALTIME_PRIORITY_CLASS processes.THREAD_PRIORITY_LOWESTIndicates 2 points below normal priority for the priority class.THREAD_PRIORITY_NORMALIndicates normal priority for the priority class.THREAD_PRIORITY_TIME_CRITICALIndicates a base-priority level of 15 for IDLE_PRIORITY_CLASS, BELOW_NORMAL_PRIORITY_CLASS, NORMAL_PRIORITY_CLASS, ABOVE_NORMAL_PRIORITY_CLASS, or HIGH_PRIORITY_CLASS processes, and a base-priority level of 31 for REALTIME_PRIORITY_CLASS processes.35、GetWindowThreadProcessId 获取与指定窗口关联在一起的一个进程和线程标识符DWORD GetWindowThreadProcessId( HWND hWnd, / handle to window LPDWORD lpdwProcessId / process identifier);36、LoadLibrary 载入指定的动态链接库,并将它映射到当前进程使用的地址空间HMODULE LoadLibrary( LPCTSTR lpFileName / file name of module);37、LoadLibraryEx 装载指定的动态链接库,并为当前进程把它映射到地址空间HMODULE LoadLibraryEx( LPCTSTR lpFileName, / file name of module HANDLE hFile, / reserved, must be NULL DWORD dwFlags / entry-point execution option);38、LoadModule 载入一个Windows应用程序,并在指定的环境中运行DWORD LoadModule( LPCSTR lpModuleName, / file name of application LPVOID lpParameterBlock / parameter block );39、MsgWaitForMultipleObjects 等侯单个对象或一系列对象发出信号。如返回条件已经满足,则立即返回DWORD MsgWaitForMultipleObjects( DWORD nCount, / number of handles in array CONST HANDLEpHandles,/ object-handle array BOOL fWaitAll, / wait option DWORD dwMilliseconds, / time-out interval DWORD dwWakeMask / input-event type);40、SetPriorityClass 设置一个进程的优先级别BOOL SetPriorityClass( HANDLE hProcess, / handle to process DWORD dwPriorityClass / priority class);41、 SetProcessShutdo

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论