2012-07-29 08:27:12 +04:00
|
|
|
/**
|
|
|
|
* xrdp: A Remote Desktop Protocol server.
|
|
|
|
*
|
2013-06-08 21:51:53 +04:00
|
|
|
* Copyright (C) Jay Sorg 2012-2013
|
|
|
|
* Copyright (C) Thomas Goddard 2012-2013
|
|
|
|
* Copyright (C) Laxmikant Rashinkar 2012-2013
|
2012-07-29 08:27:12 +04:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
2012-09-20 07:51:34 +04:00
|
|
|
|
2012-07-29 08:27:12 +04:00
|
|
|
/*
|
2012-09-20 07:51:34 +04:00
|
|
|
* xrdpapi header, do not use os_calls.h, arch.h or any xrdp internal headers
|
|
|
|
* this file is included in 3rd party apps
|
|
|
|
*/
|
2012-07-29 08:27:12 +04:00
|
|
|
|
|
|
|
#if !defined(XRDPAPI_H_)
|
|
|
|
#define XRDPAPI_H_
|
|
|
|
|
2012-08-03 03:22:01 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2012-09-28 06:48:44 +04:00
|
|
|
#define WTS_CURRENT_SERVER_HANDLE 0x00000000
|
|
|
|
#define WTS_CURRENT_SESSION 0xffffffff
|
|
|
|
|
|
|
|
#define WTS_CHANNEL_OPTION_STATIC 0x00000000
|
|
|
|
#define WTS_CHANNEL_OPTION_DYNAMIC 0x00000001
|
|
|
|
#define WTS_CHANNEL_OPTION_DYNAMIC_NO_COMPRESS 0x00000001
|
|
|
|
#define WTS_CHANNEL_OPTION_DYNAMIC_PRI_LOW 0x00000001
|
|
|
|
#define WTS_CHANNEL_OPTION_DYNAMIC_PRI_MED 0x00000002
|
|
|
|
#define WTS_CHANNEL_OPTION_DYNAMIC_PRI_HIGH 0x00000003
|
|
|
|
#define WTS_CHANNEL_OPTION_DYNAMIC_PRI_REAL 0x00000004
|
2012-07-29 08:27:12 +04:00
|
|
|
|
2012-08-03 01:39:35 +04:00
|
|
|
typedef enum _WTS_VIRTUAL_CLASS
|
|
|
|
{
|
2012-09-28 06:48:44 +04:00
|
|
|
WTSVirtualClientData,
|
|
|
|
WTSVirtualFileHandle
|
2012-11-10 07:55:21 +04:00
|
|
|
}
|
|
|
|
WTS_VIRTUAL_CLASS;
|
2012-08-03 01:39:35 +04:00
|
|
|
|
2012-07-29 08:27:12 +04:00
|
|
|
/*
|
2012-09-28 06:48:44 +04:00
|
|
|
* Reference:
|
|
|
|
* http://msdn.microsoft.com/en-us/library/windows/desktop/aa383464(v=vs.85).aspx
|
|
|
|
*/
|
|
|
|
|
2012-11-10 07:55:21 +04:00
|
|
|
void *WTSVirtualChannelOpen(void *hServer, unsigned int SessionId,
|
|
|
|
const char *pVirtualName);
|
2012-09-28 06:48:44 +04:00
|
|
|
|
2012-11-10 07:55:21 +04:00
|
|
|
void *WTSVirtualChannelOpenEx(unsigned int SessionId,
|
|
|
|
const char *pVirtualName, unsigned int flags);
|
2012-09-28 06:48:44 +04:00
|
|
|
|
2012-11-10 07:55:21 +04:00
|
|
|
int WTSVirtualChannelWrite(void *hChannelHandle, const char *Buffer,
|
|
|
|
unsigned int Length, unsigned int *pBytesWritten);
|
2012-09-28 06:48:44 +04:00
|
|
|
|
2012-11-10 07:55:21 +04:00
|
|
|
int WTSVirtualChannelRead(void *hChannelHandle, unsigned int TimeOut,
|
|
|
|
char *Buffer, unsigned int BufferSize,
|
|
|
|
unsigned int *pBytesRead);
|
2012-09-28 06:48:44 +04:00
|
|
|
|
2012-11-10 07:55:21 +04:00
|
|
|
int WTSVirtualChannelClose(void *hChannelHandle);
|
2012-09-28 06:48:44 +04:00
|
|
|
|
2012-11-10 07:55:21 +04:00
|
|
|
int WTSVirtualChannelQuery(void *hChannelHandle, WTS_VIRTUAL_CLASS WtsVirtualClass,
|
|
|
|
void **ppBuffer, unsigned int *pBytesReturned);
|
2012-09-28 06:48:44 +04:00
|
|
|
|
2012-11-10 07:55:21 +04:00
|
|
|
void WTSFreeMemory(void *pMemory);
|
2012-07-29 08:27:12 +04:00
|
|
|
|
2012-08-03 03:22:01 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2012-07-29 08:27:12 +04:00
|
|
|
#endif /* XRDPAPI_H_ */
|