📄 cchannel.h
字号:
/* CHANNEL_RC_NOT_IN_VIRTUALCHANNELENTRY */
/* */
/* Parameters */
/* */
/* - ppInitHandle (returned) - handle to pass to subsequent */
/* VirtualChannelXxx calls */
/* - pChannel - list of names registered by this application */
/* - channelCount - number of channels registered. */
/* - versionRequested - level of virtual channel support requested (one of */
/* the VIRTUAL_CHANNEL_LEVEL_XXX parameters) */
/* - pChannelInitEventProc - address of VirtualChannelInitEvent procedure */
/* */
/****************************************************************************/
typedef UINT VCAPITYPE VIRTUALCHANNELINIT(
LPVOID FAR * ppInitHandle,
PCHANNEL_DEF pChannel,
INT channelCount,
ULONG versionRequested,
PCHANNEL_INIT_EVENT_FN pChannelInitEventProc);
typedef VIRTUALCHANNELINIT FAR * PVIRTUALCHANNELINIT;
/****************************************************************************/
/* Name: VirtualChannelOpen */
/* */
/* Purpose: */
/* */
/* This function is called by the application to open a channel. It cannot */
/* be called until a connection is established with a Server. */
/* */
/* Returns: */
/* */
/* CHANNEL_RC_OK */
/* CHANNEL_RC_NOT_INITIALIZED */
/* CHANNEL_RC_NOT_CONNECTED */
/* CHANNEL_RC_BAD_CHANNEL_NAME */
/* CHANNEL_RC_BAD_INIT_HANDLE */
/* */
/* Params: */
/* */
/* - pInitHandle - handle from VirtualChannelInit */
/* */
/* - pOpenHandle (returned) - handle to pass to subsequent */
/* VirtualChannelXxx calls */
/* - pChannelName - name of channel to open */
/* - pChannelOpenEventProc - address of VirtualChannelOpenEvent procedure */
/* */
/****************************************************************************/
typedef UINT VCAPITYPE VIRTUALCHANNELOPEN(
LPVOID pInitHandle,
LPDWORD pOpenHandle,
PCHAR pChannelName,
PCHANNEL_OPEN_EVENT_FN pChannelOpenEventProc);
typedef VIRTUALCHANNELOPEN FAR * PVIRTUALCHANNELOPEN;
/****************************************************************************/
/* Name: VirtualChannelClose */
/* */
/* Purpose: */
/* */
/* This function is called to close a previously opened channel. */
/* */
/* Returns: */
/* */
/* CHANNEL_RC_OK */
/* CHANNEL_RC_BAD_CHANNEL_HANDLE */
/* */
/* Params: */
/* */
/* - openHandle - handle returned on VirtualChannelOpen */
/* */
/****************************************************************************/
typedef UINT VCAPITYPE VIRTUALCHANNELCLOSE(DWORD openHandle);
typedef VIRTUALCHANNELCLOSE FAR * PVIRTUALCHANNELCLOSE;
/****************************************************************************/
/* Name: VirtualChannelWrite */
/* */
/* Purpose: */
/* */
/* This function is used to send data to the partner app on the Server. */
/* */
/* VirtualChannelWrite copies the data to one or more network buffers as */
/* necessary. VirtualChannelWrite ensures that data is sent to the Server */
/* on the right context. It sends all data on MS TC's Sender thread. */
/* */
/* VirtualChannelWrite is asynchronous - the VirtualChannelOpenEvent */
/* procedure is called when the write completes. Until that callback is */
/* made, the caller must not free or reuse the buffer passed on */
/* VirtualChannelWrite. The caller passes a piece of data (pUserData) to */
/* VirtualChannelWrite, which is returned on the VirtualChannelOpenEvent */
/* callback. The caller can use this data to identify the write which has */
/* completed. */
/* */
/* */
/* Returns: */
/* */
/* CHANNEL_RC_OK */
/* CHANNEL_RC_NOT_INITIALIZED */
/* CHANNEL_RC_NOT_CONNECTED */
/* CHANNEL_RC_BAD_CHANNEL_HANDLE */
/* */
/* Params: */
/* - openHandle - handle from VirtualChannelOpen */
/* - pData - data to write */
/* - datalength - length of data to write */
/* - pUserData - user supplied data, returned on VirtualChannelOpenEvent */
/* when the write completes */
/* */
/****************************************************************************/
typedef UINT VCAPITYPE VIRTUALCHANNELWRITE(DWORD openHandle,
LPVOID pData,
ULONG dataLength,
LPVOID pUserData);
typedef VIRTUALCHANNELWRITE FAR * PVIRTUALCHANNELWRITE;
/****************************************************************************/
/* Structure: CHANNEL_ENTRY_POINTS */
/* */
/* Description: Virtual Channel entry points passed to VirtualChannelEntry */
/****************************************************************************/
typedef struct tagCHANNEL_ENTRY_POINTS
{
DWORD cbSize;
DWORD protocolVersion;
PVIRTUALCHANNELINIT pVirtualChannelInit;
PVIRTUALCHANNELOPEN pVirtualChannelOpen;
PVIRTUALCHANNELCLOSE pVirtualChannelClose;
PVIRTUALCHANNELWRITE pVirtualChannelWrite;
} CHANNEL_ENTRY_POINTS, FAR * PCHANNEL_ENTRY_POINTS;
/****************************************************************************/
/* Name: VirtualChannelEntry */
/* */
/* Purpose: */
/* */
/* This function is provided by addin DLLS. It is called by MSTSC at */
/* initialization to tell the addin DLL the addresses of the */
/* VirtualChannelXxx functions. */
/* */
/* Returns: */
/* */
/* TRUE - everything OK */
/* FALSE - error, unload the DLL */
/* */
/* Parameters: */
/* */
/* - pVirtualChannelInit - pointers to VirtualChannelXxx functions */
/* - pVirtualChannelOpen */
/* - pVirtualChannelClose */
/* - pVirtualChannelWrite */
/* */
/****************************************************************************/
typedef BOOL VCAPITYPE VIRTUALCHANNELENTRY(
PCHANNEL_ENTRY_POINTS pEntryPoints);
typedef VIRTUALCHANNELENTRY FAR * PVIRTUALCHANNELENTRY;
#ifdef __cplusplus
}
#endif /* __cplusplus */
#pragma option pop /*P_O_Pop*/
#endif /* H_CCHANNEL */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -