From 0e6210fb13f65c0a96c4dda98ac6b89fd3974b99 Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Sat, 28 Jul 2012 21:27:12 -0700 Subject: [PATCH] added xrdpapi --- xrdpapi/xrdpapi.h | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 xrdpapi/xrdpapi.h diff --git a/xrdpapi/xrdpapi.h b/xrdpapi/xrdpapi.h new file mode 100644 index 00000000..c4571e46 --- /dev/null +++ b/xrdpapi/xrdpapi.h @@ -0,0 +1,50 @@ +/** + * xrdp: A Remote Desktop Protocol server. + * + * Copyright (C) Thomas Goddard 2012 + * Copyright (C) Jay Sorg 2012 + * + * 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. + */ +/* + xrdpapi header +*/ + +#if !defined(XRDPAPI_H_) +#define XRDPAPI_H_ + +#define WTS_CURRENT_SERVER_HANDLE 0 +#define WTS_CURRENT_SESSION 0xffffffff + +/* + Reference: + http://msdn.microsoft.com/en-us/library/windows/desktop/aa383464(v=vs.85).aspx +*/ +void* +WTSVirtualChannelOpen(void* hServer, unsigned int SessionId, + const char* pVirtualName); +void* +WTSVirtualChannelOpenEx(unsigned int SessionId, + const char* pVirtualName, + unsigned int flags); +int +WTSVirtualChannelWrite(void* hChannelHandle, const char* Buffer, + unsigned int Length, unsigned int* pBytesWritten); +int +WTSVirtualChannelRead(void* nChannelHandle, unsigned int TimeOut, + char* Buffer, unsigned int BufferSize, + unsigned int* pBytesRead); +int +WTSVirtualChannelClose(void* openHandle); + +#endif /* XRDPAPI_H_ */