2024年3月25日发(作者:)
windows进程相关函数
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
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
);
8、CreatePipe 创建一个匿名管道
BOOL CreatePipe(
PHANDLE hReadPipe, // read handle
PHANDLE hWritePipe, // write handle
LPSECURITY_ATTRIBUTES
attributes
lpPipeAttributes, // security
nDefaultTimeOut, // time-out interval
LPSECURITY_ATTRIBUTES lpSecurityAttributes// SD
lReadTimeout, // read time-out interval
LPSECURITY_ATTRIBUTES lpSecurityAttributes // inheritance
发布评论