146 assert(bitcount && bitcount <= 32);
147 assert(fromalign <= toalign);
151 bool flipped =
height < 0;
157 int fromstride =
alignup(bytesperrow, fromalign);
158 int tostride =
alignup(bytesperrow, toalign);
159 assert(fromstride <= tostride);
168 const int pad = tostride - fromstride;
176 tostride = - tostride;
201 b.bmi.bmiHeader.biSize =
sizeof(
b.bmi.bmiHeader);
202 b.bmi.bmiHeader.biWidth =
width;
203 b.bmi.bmiHeader.biHeight =
height;
204 b.bmi.bmiHeader.biPlanes = 1;
205 b.bmi.bmiHeader.biBitCount = bitcount;
206 b.bmi.bmiHeader.biCompression =
BI_RGB;
207 b.bmi.bmiHeader.biSizeImage = 0;
208 b.bmi.bmiHeader.biXPelsPerMeter = 0;
209 b.bmi.bmiHeader.biYPelsPerMeter = 0;
213 b.bmi.bmiHeader.biClrUsed = 0;
214 b.bmi.bmiHeader.biClrImportant = 0;
218 b.bmi.bmiHeader.biClrUsed = 2 << bitcount;
219 b.bmi.bmiHeader.biClrImportant = 2 << bitcount;
274 for(
size_t i = 0;
i < 8; ++
i)
292#if defined(_MSC_VER) && _MSC_VER >= 1400
293#define SEALED_ sealed
316 WNDCLASSEX wcexConsole = {
sizeof(wcexConsole) };
317 WNDCLASSEX wcexDisplay = {
sizeof(wcexDisplay) };
641 for(
int i = 0;
i < npoints; ++
i)
701 for(
int i = 0;
i <
cy; ++
i)
759 void Display_TriBlt(
uint8 opcode,
int x,
int y,
int cx,
int cy,
HBITMAP src,
int srcx,
int srcy,
BRUSH * brush,
int bgcolour,
int fgcolour)
797 rcDamage.
left = startx;
798 rcDamage.
right = endx;
802 rcDamage.
left = endx;
803 rcDamage.
right = startx;
808 rcDamage.
top = starty;
861 for(
int i = 1;
i < npoints; ++
i)
946 int xyoffset = ttext[++
idx];
948 if((xyoffset & 0x80))
951 y += ttext[
idx + 1] | (ttext[
idx + 2] << 8);
953 x += ttext[
idx + 1] | (ttext[
idx + 2] << 8);
1041 warning(
"Skipping short 0xff command:");
1060 warning(
"Skipping short 0xfe command:");
1133 for(
int i = 0;
i <
cy; ++
i)
1240#pragma warning(push)
1241#pragma warning(disable: 4584)
1288 DWORD m_apartmentThreadId;
1290 bool InsideApartment()
const
1304 return InnerToOuter(
this);
1315 return Outer()->addRef();
1320 return Outer()->release();
1356 return m_SafetyOptions & INTERFACESAFE_FOR_UNTRUSTED_CALLER;
1461 assert(InsideApartment());
1476 assert(InsideApartment());
1491 assert(InsideApartment());
1519 assert(InsideApartment());
1529 assert(InsideApartment());
1551 assert(InsideApartment());
1563 assert(InsideApartment());
1574 assert(InsideApartment());
1585 assert(InsideApartment());
1590 *retVal = prop ? VARIANT_TRUE : VARIANT_FALSE;
1596 assert(InsideApartment());
1608 if(m_EventSinksCount > 1)
1609 return m_EventSinks;
1623 assert(InsideApartment());
1634 for(
size_t i = 0;
i < m_EventSinksCount; ++
i)
1638 typedef void (RdpClient::* AsyncEventCallback)
1656 for(
unsigned int i = 0;
i < cArgs; ++
i)
1668 unsigned int cArgs = 0,
1673 assert(InsideApartment());
1681 InvokeSinks(eventId, rgvarg, cArgs,
retval);
1733 case RDPC_WM_SYNC_EVENT:
1736 case RDPC_WM_ASYNC_EVENT:
1741 FireEventInsideApartment
1750 if(uMsg == RDPC_WM_ASYNC_EVENT)
1757 case RDPC_WM_DISCONNECT:
1760 assert(InsideApartment());
1765 JoinProtocolThread();
1768 PerformDisconnect(
static_cast<long>(
wParam));
1773 case RDPC_WM_REDIRECT:
1829 ReplaceProperty(m_Server, lpszNewServer);
1830 ReplaceProperty(m_LoadBalanceInfo, lpszNewCookie);
1831 ReplaceProperty(m_UserName, strNewUsername);
1832 ReplaceProperty(m_Domain, strNewDomain);
1833 ReplaceProperty(m_ClearTextPassword, strNewPassword);
1855 case RDPC_WM_REQUEST_CLOSE:
1862 if(m_loggedIn && !FireConfirmClose())
1866 if(m_protocolThread ==
NULL)
1870 TerminateProtocolThread();
1892 unsigned int cArgs = 0,
1897 assert(!InsideApartment());
1899 SendMessage(m_controlWindow, RDPC_WM_SYNC_EVENT, 0,
reinterpret_cast<LPARAM>(&syncEvent));
1907 unsigned int cArgs = 0,
1912 assert(!InsideApartment());
1916 if(asyncEvent ==
NULL)
1919 asyncEvent->
eventId = eventId;
1920 asyncEvent->
rgvarg = rgvarg;
1921 asyncEvent->
cArgs = cArgs;
1924 if(!
PostMessage(m_controlWindow, RDPC_WM_ASYNC_EVENT, 0,
reinterpret_cast<LPARAM>(asyncEvent)))
1937 FireEventOutsideApartment(1);
1943 FireEventOutsideApartment(2);
1949 FireEventOutsideApartment(3);
1961 FireEventInsideApartment(5);
1967 FireEventInsideApartment(6);
1975 std::copy(chanName + 0, chanName +
ARRAYSIZE(chanName), wchanName);
1979 if(bstrChanName ==
NULL)
1984 if(bstrChanData ==
NULL)
1990 CopyMemory(bstrChanData, chanData, chanDataSize);
1995 args[1].bstrVal = bstrChanName;
1998 args[0].bstrVal = bstrChanData;
2012 FireEventInsideApartment(8);
2018 FireEventInsideApartment(9);
2026 arg.lVal = errorCode;
2029 FireEventOutsideApartment(10, &
arg, 1);
2037 arg.lVal = errorCode;
2040 FireEventInsideApartment(10, &
arg, 1);
2048 arg.lVal = warningCode;
2051 FireEventOutsideApartment(11, &
arg, 1);
2071 FireEventOutsideApartment(13);
2077 FireEventInsideApartment(14);
2086 retval.pboolVal = &allowClose;
2089 FireEventInsideApartment(15,
NULL, 0, &
retval);
2091 return allowClose != VARIANT_FALSE;
2098 if(!m_NotifyTSPublicKey)
2103 if(bstrPublicKey ==
NULL)
2106 CopyMemory(bstrPublicKey, publicKey, publicKeyLength);
2113 arg.bstrVal = bstrPublicKey;
2116 retval.pboolVal = &continueLogon;
2119 FireEventOutsideApartment(16, &
arg, 1, &
retval);
2131 args[1].lVal = disconnectReason;
2134 args[0].lVal = attemptCount;
2137 retval.plVal = &continueStatus;
2142 return continueStatus;
2148 FireEventOutsideApartment(18);
2154 FireEventOutsideApartment(19);
2165 pvObject =
static_cast<IUnknown *
>(&m_inner);
2170 else if(
riid == IID_IObjectSafety)
2183 pvObject =
static_cast<IPersist *
>(
this);
2190 else if(
riid == IID_IQuickActivate)
2197 pvObject =
static_cast<IMsTscAx *
>(
this);
2243 m_punkOuter(punkOuter),
2245 m_typeLibIndex(libIndex),
2248 m_controlWindow(
NULL),
2268 m_DisconnectedText(),
2270 m_FullScreenTitle(),
2273 m_LoadBalanceInfo(),
2274 m_ConnectedStatusText(),
2275 m_ClearTextPassword(),
2276 m_RdpdrLocalPrintingDocName(),
2277 m_RdpdrClipCleanTempDirString(),
2278 m_RdpdrClipPasteInfoString(),
2279 m_UIParentWindowHandle(),
2284 m_KeyboardHookMode(2),
2285 m_AudioRedirectionMode(0),
2287 m_SasSequence(0xAA03),
2294 m_HotKeyCtrlAltDel(
VK_END),
2296 m_orderDrawThresold(0),
2297 m_BitmapCacheSize(1500),
2298 m_BitmapVirtualCacheSize(10),
2299 m_brushSupportLevel(),
2300 m_minInputSendInterval(),
2301 m_InputEventsAtOnce(),
2303 m_keepAliveInternal(0),
2304 m_shutdownTimeout(10),
2305 m_overallConnectionTimeout(120),
2306 m_singleConnectionTimeout(30),
2307 m_MinutesToIdleTimeout(0),
2308 m_BitmapVirtualCache16BppSize(20),
2309 m_BitmapVirtualCache24BppSize(30),
2310 m_PerformanceFlags(),
2311 m_MaxReconnectAttempts(20),
2312 m_AuthenticationLevel(0),
2316 m_BitmapPersistence(
true),
2317 m_allowBackgroundInput(
false),
2318 m_ContainerHandledFullScreen(
false),
2319 m_DisableRdpdr(
false),
2320 m_SecuredSettingsEnabled(
true),
2321 m_FullScreen(
false),
2322 m_AcceleratorPassthrough(
true),
2323 m_ShadowBitmap(
true),
2324 m_EncryptionEnabled(
true),
2325 m_DedicatedTerminal(
false),
2326 m_DisableCtrlAltDel(
true),
2327 m_EnableWindowsKey(
true),
2328 m_DoubleClickDetect(
false),
2329 m_MaximizeShell(
true),
2330 m_ScaleBitmapCachesByBpp(
false),
2331 m_CachePersistenceActive(
false),
2332 m_ConnectToServerConsole(
false),
2333 m_SmartSizing(
false),
2334 m_DisplayConnectionBar(
true),
2335 m_PinConnectionBar(
true),
2336 m_GrabFocusOnConnect(
true),
2337 m_RedirectDrives(
false),
2338 m_RedirectPrinters(
false),
2339 m_RedirectPorts(
false),
2340 m_RedirectSmartCards(
false),
2341 m_NotifyTSPublicKey(
false),
2342 m_CanAutoReconnect(
false),
2343 m_EnableAutoReconnect(
true),
2344 m_ConnectionBarShowMinimizeButton(
true),
2345 m_ConnectionBarShowRestoreButton(
true)
2347 if(m_punkOuter ==
NULL)
2348 m_punkOuter = &m_inner;
2359 TerminateProtocolThread();
2368 DestroyControlWindow();
2378 for(
size_t i = 0;
i < m_EventSinksCount; ++
i)
2381 if(m_EventSinksCount > 1)
2382 delete[] m_EventSinks;
2413 friend class AdvancedSettings;
2420 return InnerToOuter(
this);
2425 return InnerToOuter(
this);
2436 HRESULT hr = Outer()->LoadTypeLibrary();
2441 assert(MSTSCLib::IID_IMsRdpClientAdvancedSettings4 == MSTSCLib_Redist::IID_IMsRdpClientAdvancedSettings4);
2443 hr = Outer()->m_typeLib->GetTypeInfoOfGuid(MSTSCLib::IID_IMsRdpClientAdvancedSettings4, &m_dispTypeInfo);
2459 m_dispTypeInfo->
AddRef();
2460 *ppTI = m_dispTypeInfo;
2500 return Outer()->addRef();
2505 return Outer()->release();
2520 return AcquireDispTypeInfo(ppTInfo);
2530 return m_dispTypeInfo->
GetIDsOfNames(rgszNames, cNames, rgDispId);
2535 return m_dispTypeInfo->
Invoke
2550 return Outer()->SetProperty(Outer()->m_Compress, pcompress);
2553 virtual STDMETHODIMP IMsTscAdvancedSettings::get_Compress(
long * pcompress)
const
2555 return Outer()->GetProperty(Outer()->m_Compress, pcompress);
2558 virtual STDMETHODIMP IMsTscAdvancedSettings::put_BitmapPeristence(
long pbitmapPeristence)
2560 return Outer()->SetProperty(Outer()->m_BitmapPersistence, pbitmapPeristence);
2563 virtual STDMETHODIMP IMsTscAdvancedSettings::get_BitmapPeristence(
long * pbitmapPeristence)
const
2565 return Outer()->GetProperty(Outer()->m_BitmapPersistence, pbitmapPeristence);
2568 virtual STDMETHODIMP IMsTscAdvancedSettings::put_allowBackgroundInput(
long pallowBackgroundInput)
2570 if(Outer()->IsSafeForScripting())
2573 return Outer()->SetProperty(Outer()->m_allowBackgroundInput, pallowBackgroundInput);
2576 virtual STDMETHODIMP IMsTscAdvancedSettings::get_allowBackgroundInput(
long * pallowBackgroundInput)
const
2578 return Outer()->GetProperty(Outer()->m_allowBackgroundInput, pallowBackgroundInput);
2583 return Outer()->SetProperty(Outer()->m_KeyboardLayoutString, rhs);
2591 if(Outer()->IsSafeForScripting())
2610 virtual STDMETHODIMP IMsTscAdvancedSettings::put_ContainerHandledFullScreen(
long pContainerHandledFullScreen)
2612 if(Outer()->IsSafeForScripting())
2615 return Outer()->SetProperty(Outer()->m_ContainerHandledFullScreen, pContainerHandledFullScreen);
2618 virtual STDMETHODIMP IMsTscAdvancedSettings::get_ContainerHandledFullScreen(
long * pContainerHandledFullScreen)
const
2620 return Outer()->GetProperty(Outer()->m_ContainerHandledFullScreen, pContainerHandledFullScreen);
2623 virtual STDMETHODIMP IMsTscAdvancedSettings::put_DisableRdpdr(
long pDisableRdpdr)
2625 return Outer()->SetProperty(Outer()->m_DisableRdpdr, pDisableRdpdr);
2628 virtual STDMETHODIMP IMsTscAdvancedSettings::get_DisableRdpdr(
long * pDisableRdpdr)
const
2630 return Outer()->GetProperty(Outer()->m_DisableRdpdr, pDisableRdpdr);
2634 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_SmoothScroll(
long psmoothScroll)
2639 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_SmoothScroll(
long * psmoothScroll)
const
2644 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_AcceleratorPassthrough(
long pacceleratorPassthrough)
2646 return Outer()->SetProperty(Outer()->m_AcceleratorPassthrough, pacceleratorPassthrough);
2649 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_AcceleratorPassthrough(
long * pacceleratorPassthrough)
const
2651 return Outer()->GetProperty(Outer()->m_AcceleratorPassthrough, pacceleratorPassthrough);
2654 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_ShadowBitmap(
long pshadowBitmap)
2656 return Outer()->SetProperty(Outer()->m_ShadowBitmap, pshadowBitmap);
2659 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_ShadowBitmap(
long * pshadowBitmap)
const
2661 return Outer()->GetProperty(Outer()->m_ShadowBitmap, pshadowBitmap);
2664 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_TransportType(
long ptransportType)
2667 return Outer()->SetProperty(Outer()->m_TransportType, ptransportType);
2670 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_TransportType(
long * ptransportType)
const
2673 return Outer()->GetProperty(Outer()->m_TransportType, ptransportType);
2676 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_SasSequence(
long psasSequence)
2679 return Outer()->SetProperty(Outer()->m_SasSequence, psasSequence);
2682 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_SasSequence(
long * psasSequence)
const
2685 return Outer()->GetProperty(Outer()->m_SasSequence, psasSequence);
2688 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_EncryptionEnabled(
long pencryptionEnabled)
2690 return Outer()->SetProperty(Outer()->m_EncryptionEnabled, pencryptionEnabled);
2693 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_EncryptionEnabled(
long * pencryptionEnabled)
const
2695 return Outer()->GetProperty(Outer()->m_EncryptionEnabled, pencryptionEnabled);
2698 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_DedicatedTerminal(
long pdedicatedTerminal)
2700 return Outer()->SetProperty(Outer()->m_DedicatedTerminal, pdedicatedTerminal);
2703 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_DedicatedTerminal(
long * pdedicatedTerminal)
const
2705 return Outer()->GetProperty(Outer()->m_DedicatedTerminal, pdedicatedTerminal);
2708 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_RDPPort(
long prdpPort)
2710 if(prdpPort == 0 || prdpPort > 65535)
2713 return Outer()->SetProperty(Outer()->m_RDPPort, prdpPort);
2716 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RDPPort(
long * prdpPort)
const
2718 return Outer()->GetProperty(Outer()->m_RDPPort, prdpPort);
2721 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_EnableMouse(
long penableMouse)
2726 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_EnableMouse(
long * penableMouse)
const
2731 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_DisableCtrlAltDel(
long pdisableCtrlAltDel)
2733 return Outer()->SetProperty(Outer()->m_DisableCtrlAltDel, pdisableCtrlAltDel);
2736 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_DisableCtrlAltDel(
long * pdisableCtrlAltDel)
const
2738 return Outer()->GetProperty(Outer()->m_DisableCtrlAltDel, pdisableCtrlAltDel);
2741 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_EnableWindowsKey(
long penableWindowsKey)
2743 return Outer()->SetProperty(Outer()->m_EnableWindowsKey, penableWindowsKey);
2746 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_EnableWindowsKey(
long * penableWindowsKey)
const
2748 return Outer()->GetProperty(Outer()->m_EnableWindowsKey, penableWindowsKey);
2751 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_DoubleClickDetect(
long pdoubleClickDetect)
2753 return Outer()->SetProperty(Outer()->m_DoubleClickDetect, pdoubleClickDetect);
2756 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_DoubleClickDetect(
long * pdoubleClickDetect)
const
2758 return Outer()->GetProperty(Outer()->m_DoubleClickDetect, pdoubleClickDetect);
2761 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_MaximizeShell(
long pmaximizeShell)
2763 return Outer()->SetProperty(Outer()->m_MaximizeShell, pmaximizeShell);
2766 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_MaximizeShell(
long * pmaximizeShell)
const
2768 return Outer()->GetProperty(Outer()->m_MaximizeShell, pmaximizeShell);
2771 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_HotKeyFullScreen(
long photKeyFullScreen)
2773 return Outer()->SetProperty(Outer()->m_HotKeyFullScreen, photKeyFullScreen);
2776 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyFullScreen(
long * photKeyFullScreen)
const
2778 return Outer()->GetProperty(Outer()->m_HotKeyFullScreen, photKeyFullScreen);
2781 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_HotKeyCtrlEsc(
long photKeyCtrlEsc)
2783 return Outer()->SetProperty(Outer()->m_HotKeyCtrlEsc, photKeyCtrlEsc);
2786 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyCtrlEsc(
long * photKeyCtrlEsc)
const
2788 return Outer()->GetProperty(Outer()->m_HotKeyCtrlEsc, photKeyCtrlEsc);
2791 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_HotKeyAltEsc(
long photKeyAltEsc)
2793 return Outer()->SetProperty(Outer()->m_HotKeyAltEsc, photKeyAltEsc);
2796 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyAltEsc(
long * photKeyAltEsc)
const
2798 return Outer()->GetProperty(Outer()->m_HotKeyAltEsc, photKeyAltEsc);
2801 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_HotKeyAltTab(
long photKeyAltTab)
2803 return Outer()->SetProperty(Outer()->m_HotKeyAltTab, photKeyAltTab);
2806 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyAltTab(
long * photKeyAltTab)
const
2808 return Outer()->GetProperty(Outer()->m_HotKeyAltTab, photKeyAltTab);
2811 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_HotKeyAltShiftTab(
long photKeyAltShiftTab)
2813 return Outer()->SetProperty(Outer()->m_HotKeyAltShiftTab, photKeyAltShiftTab);
2816 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyAltShiftTab(
long * photKeyAltShiftTab)
const
2818 return Outer()->GetProperty(Outer()->m_HotKeyAltShiftTab, photKeyAltShiftTab);
2821 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_HotKeyAltSpace(
long photKeyAltSpace)
2823 return Outer()->SetProperty(Outer()->m_HotKeyAltSpace, photKeyAltSpace);
2826 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyAltSpace(
long * photKeyAltSpace)
const
2828 return Outer()->GetProperty(Outer()->m_HotKeyAltSpace, photKeyAltSpace);
2831 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_HotKeyCtrlAltDel(
long photKeyCtrlAltDel)
2833 return Outer()->SetProperty(Outer()->m_HotKeyCtrlAltDel, photKeyCtrlAltDel);
2836 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyCtrlAltDel(
long * photKeyCtrlAltDel)
const
2838 return Outer()->GetProperty(Outer()->m_HotKeyCtrlAltDel, photKeyCtrlAltDel);
2841 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_orderDrawThreshold(
long porderDrawThreshold)
2846 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_orderDrawThreshold(
long * porderDrawThreshold)
const
2851 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_BitmapCacheSize(
long pbitmapCacheSize)
2854 if(pbitmapCacheSize < 0 || pbitmapCacheSize > 32)
2857 return Outer()->SetProperty(Outer()->m_BitmapCacheSize, pbitmapCacheSize);
2860 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_BitmapCacheSize(
long * pbitmapCacheSize)
const
2862 return Outer()->GetProperty(Outer()->m_BitmapCacheSize, pbitmapCacheSize);
2865 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_BitmapVirtualCacheSize(
long pbitmapVirtualCacheSize)
2867 if(pbitmapVirtualCacheSize < 0 || pbitmapVirtualCacheSize > 32)
2870 return Outer()->SetProperty(Outer()->m_BitmapVirtualCacheSize, pbitmapVirtualCacheSize);
2873 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_BitmapVirtualCacheSize(
long * pbitmapVirtualCacheSize)
const
2875 return Outer()->GetProperty(Outer()->m_BitmapVirtualCacheSize, pbitmapVirtualCacheSize);
2878 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_ScaleBitmapCachesByBPP(
long pbScale)
2883 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_ScaleBitmapCachesByBPP(
long * pbScale)
const
2888 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_NumBitmapCaches(
long pnumBitmapCaches)
2890 return Outer()->SetProperty(Outer()->m_NumBitmapCaches, pnumBitmapCaches);
2893 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_NumBitmapCaches(
long * pnumBitmapCaches)
const
2895 return Outer()->GetProperty(Outer()->m_NumBitmapCaches, pnumBitmapCaches);
2898 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_CachePersistenceActive(
long pcachePersistenceActive)
2900 return Outer()->SetProperty(Outer()->m_CachePersistenceActive, pcachePersistenceActive);
2903 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_CachePersistenceActive(
long * pcachePersistenceActive)
const
2905 return Outer()->GetProperty(Outer()->m_CachePersistenceActive, pcachePersistenceActive);
2913 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_brushSupportLevel(
long pbrushSupportLevel)
2915 return Outer()->SetProperty(Outer()->m_brushSupportLevel, pbrushSupportLevel);
2918 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_brushSupportLevel(
long * pbrushSupportLevel)
const
2920 return Outer()->GetProperty(Outer()->m_brushSupportLevel, pbrushSupportLevel);
2923 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_minInputSendInterval(
long pminInputSendInterval)
2929 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_minInputSendInterval(
long * pminInputSendInterval)
const
2935 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_InputEventsAtOnce(
long pinputEventsAtOnce)
2941 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_InputEventsAtOnce(
long * pinputEventsAtOnce)
const
2947 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_maxEventCount(
long pmaxEventCount)
2953 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_maxEventCount(
long * pmaxEventCount)
const
2959 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_keepAliveInterval(
long pkeepAliveInterval)
2961 if(pkeepAliveInterval && pkeepAliveInterval < 10)
2964 return Outer()->SetProperty(Outer()->m_keepAliveInternal, pkeepAliveInterval);
2967 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_keepAliveInterval(
long * pkeepAliveInterval)
const
2969 return Outer()->GetProperty(Outer()->m_keepAliveInternal, pkeepAliveInterval);
2972 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_shutdownTimeout(
long pshutdownTimeout)
2974 if(pshutdownTimeout >= 600)
2977 return Outer()->SetProperty(Outer()->m_shutdownTimeout, pshutdownTimeout);
2980 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_shutdownTimeout(
long * pshutdownTimeout)
const
2982 return Outer()->GetProperty(Outer()->m_shutdownTimeout, pshutdownTimeout);
2985 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_overallConnectionTimeout(
long poverallConnectionTimeout)
2987 if(poverallConnectionTimeout < 0 || poverallConnectionTimeout >= 600)
2990 return Outer()->SetProperty(Outer()->m_overallConnectionTimeout, poverallConnectionTimeout);
2993 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_overallConnectionTimeout(
long * poverallConnectionTimeout)
const
2995 return Outer()->GetProperty(Outer()->m_overallConnectionTimeout, poverallConnectionTimeout);
2998 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_singleConnectionTimeout(
long psingleConnectionTimeout)
3000 if(psingleConnectionTimeout >= 600)
3003 return Outer()->SetProperty(Outer()->m_singleConnectionTimeout, psingleConnectionTimeout);
3006 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_singleConnectionTimeout(
long * psingleConnectionTimeout)
const
3008 return Outer()->GetProperty(Outer()->m_singleConnectionTimeout, psingleConnectionTimeout);
3011 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_KeyboardType(
long pkeyboardType)
3016 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_KeyboardType(
long * pkeyboardType)
const
3021 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_KeyboardSubType(
long pkeyboardSubType)
3026 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_KeyboardSubType(
long * pkeyboardSubType)
const
3031 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_KeyboardFunctionKey(
long pkeyboardFunctionKey)
3036 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_KeyboardFunctionKey(
long * pkeyboardFunctionKey)
const
3041 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_WinceFixedPalette(
long pwinceFixedPalette)
3046 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_WinceFixedPalette(
long * pwinceFixedPalette)
const
3053 return Outer()->SetProperty(Outer()->m_ConnectToServerConsole, pConnectToConsole);
3058 return Outer()->GetProperty(Outer()->m_ConnectToServerConsole, pConnectToConsole);
3061 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_BitmapPersistence(
long pbitmapPersistence)
3063 return put_BitmapPeristence(pbitmapPersistence);
3066 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_BitmapPersistence(
long * pbitmapPersistence)
const
3068 return get_BitmapPeristence(pbitmapPersistence);
3071 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_MinutesToIdleTimeout(
long pminutesToIdleTimeout)
3073 if(pminutesToIdleTimeout > 240)
3076 return Outer()->SetProperty(Outer()->m_MinutesToIdleTimeout, pminutesToIdleTimeout);
3079 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_MinutesToIdleTimeout(
long * pminutesToIdleTimeout)
const
3081 return Outer()->GetProperty(Outer()->m_MinutesToIdleTimeout, pminutesToIdleTimeout);
3086 return Outer()->SetProperty(Outer()->m_SmartSizing, pfSmartSizing);
3091 return Outer()->GetProperty(Outer()->m_SmartSizing, pfSmartSizing);
3094 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_RdpdrLocalPrintingDocName(
BSTR pLocalPrintingDocName)
3096 return Outer()->SetProperty(Outer()->m_RdpdrLocalPrintingDocName, pLocalPrintingDocName);
3099 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RdpdrLocalPrintingDocName(
BSTR * pLocalPrintingDocName)
const
3101 return Outer()->GetProperty(Outer()->m_RdpdrLocalPrintingDocName, pLocalPrintingDocName);
3104 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_RdpdrClipCleanTempDirString(
BSTR clipCleanTempDirString)
3106 return Outer()->SetProperty(Outer()->m_RdpdrClipCleanTempDirString, clipCleanTempDirString);
3109 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RdpdrClipCleanTempDirString(
BSTR * clipCleanTempDirString)
const
3111 return Outer()->GetProperty(Outer()->m_RdpdrClipCleanTempDirString, clipCleanTempDirString);
3114 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_RdpdrClipPasteInfoString(
BSTR clipPasteInfoString)
3116 return Outer()->SetProperty(Outer()->m_RdpdrClipPasteInfoString, clipPasteInfoString);
3119 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RdpdrClipPasteInfoString(
BSTR * clipPasteInfoString)
const
3121 return Outer()->GetProperty(Outer()->m_RdpdrClipPasteInfoString, clipPasteInfoString);
3126 return Outer()->put_ClearTextPassword(rhs);
3131 if(!pDisplayConnectionBar && Outer()->IsSafeForScripting())
3134 return Outer()->SetProperty(Outer()->m_DisplayConnectionBar, pDisplayConnectionBar);
3139 return Outer()->GetProperty(Outer()->m_DisplayConnectionBar, pDisplayConnectionBar);
3144 if(Outer()->IsSafeForScripting())
3147 return Outer()->SetProperty(Outer()->m_PinConnectionBar, pPinConnectionBar);
3152 return Outer()->GetProperty(Outer()->m_PinConnectionBar, pPinConnectionBar);
3157 return Outer()->SetProperty(Outer()->m_GrabFocusOnConnect, pfGrabFocusOnConnect);
3162 return Outer()->GetProperty(Outer()->m_GrabFocusOnConnect, pfGrabFocusOnConnect);
3167 return Outer()->SetProperty(Outer()->m_LoadBalanceInfo, pLBInfo);
3172 return Outer()->GetProperty(Outer()->m_LoadBalanceInfo, pLBInfo);
3177 return Outer()->SetProperty(Outer()->m_RedirectDrives, pRedirectDrives);
3182 return Outer()->GetProperty(Outer()->m_RedirectDrives, pRedirectDrives);
3187 return Outer()->SetProperty(Outer()->m_RedirectPrinters, pRedirectPrinters);
3192 return Outer()->GetProperty(Outer()->m_RedirectPrinters, pRedirectPrinters);
3197 return Outer()->SetProperty(Outer()->m_RedirectPorts, pRedirectPorts);
3202 return Outer()->GetProperty(Outer()->m_RedirectPorts, pRedirectPorts);
3207 return Outer()->SetProperty(Outer()->m_RedirectSmartCards, pRedirectSmartCards);
3212 return Outer()->GetProperty(Outer()->m_RedirectSmartCards, pRedirectSmartCards);
3215 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_BitmapVirtualCache16BppSize(
long pBitmapVirtualCache16BppSize)
3217 if(pBitmapVirtualCache16BppSize < 0 || pBitmapVirtualCache16BppSize > 32)
3220 return Outer()->SetProperty(Outer()->m_BitmapVirtualCache16BppSize, pBitmapVirtualCache16BppSize);
3223 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_BitmapVirtualCache16BppSize(
long * pBitmapVirtualCache16BppSize)
const
3225 return Outer()->GetProperty(Outer()->m_BitmapVirtualCache16BppSize, pBitmapVirtualCache16BppSize);
3228 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_BitmapVirtualCache24BppSize(
long pBitmapVirtualCache24BppSize)
3230 if(pBitmapVirtualCache24BppSize < 0 || pBitmapVirtualCache24BppSize > 32)
3233 return Outer()->SetProperty(Outer()->m_BitmapVirtualCache24BppSize, pBitmapVirtualCache24BppSize);
3236 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_BitmapVirtualCache24BppSize(
long * pBitmapVirtualCache24BppSize)
const
3238 return Outer()->GetProperty(Outer()->m_BitmapVirtualCache24BppSize, pBitmapVirtualCache24BppSize);
3241 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_PerformanceFlags(
long pDisableList)
3243 return Outer()->SetProperty(Outer()->m_PerformanceFlags, pDisableList);
3246 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_PerformanceFlags(
long * pDisableList)
const
3248 return Outer()->GetProperty(Outer()->m_PerformanceFlags, pDisableList);
3259 return Outer()->SetProperty(Outer()->m_NotifyTSPublicKey, pfNotify);
3264 return Outer()->GetProperty(Outer()->m_NotifyTSPublicKey, pfNotify);
3275 return Outer()->SetProperty(Outer()->m_EnableAutoReconnect, pfEnableAutoReconnect);
3280 return Outer()->GetProperty(Outer()->m_EnableAutoReconnect, pfEnableAutoReconnect);
3283 virtual STDMETHODIMP IMsRdpClientAdvancedSettings2::put_MaxReconnectAttempts(
long pMaxReconnectAttempts)
3285 if(pMaxReconnectAttempts < 0 || pMaxReconnectAttempts > 200)
3288 return Outer()->SetProperty(Outer()->m_MaxReconnectAttempts, pMaxReconnectAttempts);
3291 virtual STDMETHODIMP IMsRdpClientAdvancedSettings2::get_MaxReconnectAttempts(
long * pMaxReconnectAttempts)
const
3293 return Outer()->GetProperty(Outer()->m_MaxReconnectAttempts, pMaxReconnectAttempts);
3299 return Outer()->SetProperty(Outer()->m_ConnectionBarShowMinimizeButton, pfShowMinimize);
3304 return Outer()->GetProperty(Outer()->m_ConnectionBarShowMinimizeButton, pfShowMinimize);
3309 return Outer()->SetProperty(Outer()->m_ConnectionBarShowRestoreButton, pfShowRestore);
3314 return Outer()->GetProperty(Outer()->m_ConnectionBarShowRestoreButton, pfShowRestore);
3318 virtual STDMETHODIMP IMsRdpClientAdvancedSettings4::put_AuthenticationLevel(
unsigned int puiAuthLevel)
3321 return Outer()->SetProperty(Outer()->m_AuthenticationLevel, puiAuthLevel);
3324 virtual STDMETHODIMP IMsRdpClientAdvancedSettings4::get_AuthenticationLevel(
unsigned int * puiAuthLevel)
const
3326 return Outer()->GetProperty(Outer()->m_AuthenticationLevel, puiAuthLevel);
3334 *ppAdvSettings = &m_advancedSettings;
3339 friend class SecuredSettings;
3346 return InnerToOuter(
this);
3351 return InnerToOuter(
this);
3362 HRESULT hr = Outer()->LoadTypeLibrary();
3367 assert(MSTSCLib::IID_IMsRdpClientSecuredSettings == MSTSCLib_Redist::IID_IMsRdpClientSecuredSettings);
3369 hr = Outer()->m_typeLib->GetTypeInfoOfGuid(MSTSCLib::IID_IMsRdpClientSecuredSettings, &m_dispTypeInfo);
3385 m_dispTypeInfo->
AddRef();
3386 *ppTI = m_dispTypeInfo;
3423 return Outer()->addRef();
3428 return Outer()->release();
3443 return AcquireDispTypeInfo(ppTInfo);
3453 return m_dispTypeInfo->
GetIDsOfNames(rgszNames, cNames, rgDispId);
3458 return m_dispTypeInfo->
Invoke
3473 return Outer()->SetProperty(Outer()->m_StartProgram, pStartProgram);
3478 return Outer()->GetProperty(Outer()->m_StartProgram, pStartProgram);
3483 return Outer()->SetProperty(Outer()->m_WorkDir, pWorkDir);
3488 return Outer()->GetProperty(Outer()->m_WorkDir, pWorkDir);
3491 virtual STDMETHODIMP IMsTscSecuredSettings::put_FullScreen(
long pfFullScreen)
3493 return Outer()->put_FullScreen(!!pfFullScreen);
3496 virtual STDMETHODIMP IMsTscSecuredSettings::get_FullScreen(
long * pfFullScreen)
const
3498 return Outer()->GetProperty(Outer()->m_FullScreen, pfFullScreen);
3502 virtual STDMETHODIMP IMsRdpClientSecuredSettings::put_KeyboardHookMode(
long pkeyboardHookMode)
3504 if(pkeyboardHookMode < 0 || pkeyboardHookMode > 2)
3507 return Outer()->SetProperty(Outer()->m_KeyboardHookMode, pkeyboardHookMode);
3510 virtual STDMETHODIMP IMsRdpClientSecuredSettings::get_KeyboardHookMode(
long * pkeyboardHookMode)
const
3512 return Outer()->GetProperty(Outer()->m_KeyboardHookMode, pkeyboardHookMode);
3515 virtual STDMETHODIMP IMsRdpClientSecuredSettings::put_AudioRedirectionMode(
long pAudioRedirectionMode)
3517 if(pAudioRedirectionMode < 0 || pAudioRedirectionMode > 2)
3520 return Outer()->SetProperty(Outer()->m_AudioRedirectionMode, pAudioRedirectionMode);
3523 virtual STDMETHODIMP IMsRdpClientSecuredSettings::get_AudioRedirectionMode(
long * pAudioRedirectionMode)
const
3525 return Outer()->GetProperty(Outer()->m_AudioRedirectionMode, pAudioRedirectionMode);
3532 if(!m_SecuredSettingsEnabled)
3536 *ppSecuredSettings = &m_securedSettings;
3557 assert(m_typeLibIndex < 10);
3559 szPath[cchPathLen + 0] =
L'\\';
3560 szPath[cchPathLen + 1] =
static_cast<WCHAR>(
L'0' + m_typeLibIndex);
3561 szPath[cchPathLen + 2] = 0;
3584 assert(MSTSCLib::IID_IMsRdpClient4 == MSTSCLib_Redist::IID_IMsRdpClient4);
3602 m_dispTypeInfo->
AddRef();
3603 *ppTI = m_dispTypeInfo;
3659 return InnerToOuter(
This)->OnPublicKey(
key, key_size);
3664 return InnerToOuter(
This)->OnLogon();
3683 return InnerToOuter(
This)->OnRedirect
3716 FireLoginComplete();
3735 assert(!InsideApartment());
3753 return SendMessage(m_controlWindow, RDPC_WM_REDIRECT, 0,
reinterpret_cast<LPARAM>(&redirectArgs)) == 0;
3759 static_cast<RdpClient *
>(lpParam)->ProtocolLoop();
3785 if(m_AudioRedirectionMode == 1)
3788 if(m_ClearTextPassword)
3799 if(m_overallConnectionTimeout)
3801 overallTimeout.
QuadPart = - ((m_overallConnectionTimeout * 1000 * 1000 * 1000) / 100);
3805 if(overallConnectionTimer ==
NULL)
3809 if(overallConnectionTimer)
3820 m_ClearTextPassword,
3827 if(overallConnectionTimer)
3837 uint32 extendedDisconnectReason = 0;
3839 m_actuallyConnected =
true;
3849 m_actuallyConnected =
false;
3876 long autoReconnections = 0;
3877 long totalReconnections = 0;
3883 ++ totalReconnections;
3886 long reconnectMode = FireAutoReconnecting(m_protocolState.
disconnect_reason, totalReconnections);
3895 assert(!m_reconnectAborted);
3896 assert(m_protocolThreadWaitingReconnection ==
NULL);
3898 if(waitingReconnection ==
NULL)
3902 if(waitingReconnection ==
NULL)
3907 m_protocolThreadWaitingReconnection = waitingReconnection;
3911 m_protocolThreadWaitingReconnection =
NULL;
3913 if(m_reconnectAborted)
3923 if(m_EnableAutoReconnect)
3927 if(autoReconnections == m_MaxReconnectAttempts)
3930 ++ autoReconnections;
3933 if(overallConnectionTimer)
3944 m_ClearTextPassword,
3951 if(overallConnectionTimer)
3961 if(overallConnectionTimer)
3967 assert(m_protocolThread);
3970 m_protocolThread =
NULL;
3975 assert(m_protocolThread);
3978 if(m_protocolThreadWaitingReconnection)
3980 assert(!m_reconnectAborted);
3981 m_reconnectAborted =
true;
3982 SetEvent(m_protocolThreadWaitingReconnection);
3991 assert(m_protocolThreadWaitingReconnection ==
NULL);
3996 assert(InsideApartment());
4004 m_Connected =
false;
4013 FireEventInsideApartment(4, &
arg, 1);
4043 RdpClient *
obj =
new RdpClient(rclsid, libIndex, punkOuter);
4121 if(cConnections == 0 || m_done)
4134 if(cConnections == 0)
4137 if(cConnections == 1 && !m_done)
4143 assert(cConnections > 1 || m_done);
4185 text = m_DisconnectedText;
4186 else if(m_actuallyConnected)
4187 text = m_ConnectedStatusText;
4189 text = m_ConnectingText;
4273 TEXT(
"MissTosca_Control"),
4286 if(m_controlWindow ==
NULL)
4289 m_UIParentWindowHandle = m_controlWindow;
4295 if(m_controlWindow ==
NULL)
4299 std::swap(controlWindow, m_controlWindow);
4306 if(pActiveSite ==
NULL)
4307 pActiveSite = m_clientSite;
4309 if(pActiveSite ==
NULL)
4325 hr =
site->CanInPlaceActivate();
4333 site->OnInPlaceActivate();
4345 OLEINPLACEFRAMEINFO frameInfo = {
sizeof(frameInfo) };
4347 site->GetWindowContext(&frame, &uiWindow, &rcPos, &rcClip, &frameInfo);
4349 if(lprcPosRect ==
NULL)
4350 lprcPosRect = &rcPos;
4362 SetObjectRects(lprcPosRect, &rcClip);
4369 hr =
site->OnUIActivate();
4428 return m_punkOuter->
AddRef();
4433 return m_punkOuter->
Release();
4448 return AcquireDispTypeInfo(ppTInfo);
4458 return m_dispTypeInfo->
GetIDsOfNames(rgszNames, cNames, rgDispId);
4468 return m_dispTypeInfo->
Invoke
4486 *pIID = MSTSCLib::DIID_IMsTscAxEvents;
4510 if(m_EventSinksCount)
4514 for(
size_t i = 0;
i < m_EventSinksCount; ++
i)
4516 found = (sinks[
i] ==
NULL);
4529 if(newSinks ==
NULL)
4535 std::copy(sinks, sinks + m_EventSinksCount, newSinks);
4537 m_EventSinks = newSinks;
4554 if(dwCookie >= m_EventSinksCount || sinks[dwCookie] ==
NULL)
4557 sinks[dwCookie]->Release();
4558 sinks[dwCookie] =
NULL;
4584 if(
riid != MSTSCLib::DIID_IMsTscAxEvents)
4642 if(pdwSupportedOptions ==
NULL || pdwEnabledOptions ==
NULL)
4648 *pdwSupportedOptions = INTERFACESAFE_FOR_UNTRUSTED_CALLER;
4649 *pdwEnabledOptions = m_SafetyOptions;
4658 m_SafetyOptions = dwEnabledOptions & (dwOptionSetMask & INTERFACESAFE_FOR_UNTRUSTED_CALLER);
4731 if(m_controlWindow ==
NULL)
4760 m_clientSite = pClientSite;
4770 if(ppClientSite ==
NULL)
4776 *ppClientSite = m_clientSite;
4859 *pClsid = m_classId;
4895 return m_adviseHolder->
Advise(pAdvSink, pdwConnection);
4905 return m_adviseHolder->
Unadvise(dwConnection);
4915 return m_adviseHolder->
EnumAdvise(ppenumAdvise);
4934 if(m_controlWindow ==
NULL)
4937 *phwnd = m_controlWindow;
4949 *pClassID = m_classId;
5040 if(dwGuidKind != GUIDKIND_DEFAULT_SOURCE_DISP_IID)
5043 *pGUID = MSTSCLib::DIID_IMsTscAxEvents;
5050 if(pQaContainer ==
NULL || pQaControl ==
NULL)
5053 if(pQaContainer->
cbSize <
sizeof(*pQaContainer) || pQaControl->
cbSize <
sizeof(*pQaControl))
5063 SetAdvise(DVASPECT_CONTENT, 0, pQaContainer->
pAdviseSink);
5068 GetMiscStatus(DVASPECT_CONTENT, &pQaControl->
dwMiscStatus);
5075 return SetExtent(DVASPECT_CONTENT, pSizel);
5080 return GetExtent(DVASPECT_CONTENT, pSizel);
5124 return SetProperty(m_Server, pServer);
5129 return GetProperty(m_Server, pServer);
5134 return SetProperty(m_Domain, pDomain);
5139 return GetProperty(m_Domain, pDomain);
5144 return SetProperty(m_UserName,
pUserName);
5149 return GetProperty(m_UserName,
pUserName);
5154 return SetProperty(m_DisconnectedText, pDisconnectedText);
5159 return GetProperty(m_DisconnectedText, pDisconnectedText);
5164 return SetProperty(m_ConnectingText, pConnectingText);
5169 return GetProperty(m_ConnectingText, pConnectingText);
5174 return GetProperty(m_Connected, pIsConnected);
5179 if(pVal < 200 || pVal > 1600)
5182 return SetProperty(m_DesktopWidth, pVal);
5187 return GetProperty(m_DesktopWidth, pVal);
5192 if(pVal < 200 || pVal > 1200)
5195 return SetProperty(m_DesktopHeight, pVal);
5200 return GetProperty(m_DesktopHeight, pVal);
5205 return SetProperty(m_StartConnected, pfStartConnected);
5208 virtual STDMETHODIMP IMsTscAx::get_StartConnected(
long * pfStartConnected)
const
5210 return GetProperty(m_StartConnected, pfStartConnected);
5213 virtual STDMETHODIMP IMsTscAx::get_HorizontalScrollBarVisible(
long * pfHScrollVisible)
const
5218 virtual STDMETHODIMP IMsTscAx::get_VerticalScrollBarVisible(
long * pfVScrollVisible)
const
5229 virtual STDMETHODIMP IMsTscAx::get_CipherStrength(
long * pCipherStrength)
const
5231 if(pCipherStrength ==
NULL)
5234 *pCipherStrength = 128;
5240 if(pVersion ==
NULL)
5252 virtual STDMETHODIMP IMsTscAx::get_SecuredSettingsEnabled(
long * pSecuredSettingsEnabled)
const
5255 return GetProperty(m_SecuredSettingsEnabled, pSecuredSettingsEnabled);
5260 return GetSecuredSettings(ppSecuredSettings);
5265 return GetAdvancedSettings(ppAdvSettings);
5278 if(m_protocolThreadWaitingReconnection)
5280 SetEvent(m_protocolThreadWaitingReconnection);
5291 if(m_controlWindow ==
NULL)
5293 hr = CreateControlWindow(
NULL);
5305 if(m_clientUI ==
NULL)
5331 long keyboardLayout = -1;
5334 if(m_KeyboardLayoutString)
5335 keyboardLayout =
wcstol(m_KeyboardLayoutString, &endPtr, 0);
5338 if(endPtr ==
NULL || *endPtr == 0 || keyboardLayout == -1)
5341 m_protocolState.
keylayout = keyboardLayout;
5361 m_protocolState.
width = m_DesktopWidth;
5362 m_protocolState.
height = m_DesktopHeight;
5376 m_protocolState.
rdp.current_status = 1;
5380 m_protocolState.
cache.bmpcache_lru[0] = -1;
5381 m_protocolState.
cache.bmpcache_lru[1] = -1;
5382 m_protocolState.
cache.bmpcache_lru[2] = -1;
5383 m_protocolState.
cache.bmpcache_mru[0] = -1;
5384 m_protocolState.
cache.bmpcache_mru[1] = -1;
5385 m_protocolState.
cache.bmpcache_mru[2] = -1;
5388 m_protocolThread =
CreateThread(
NULL, 0, ProtocolLoopThreadProc,
this, 0, &dwIgnore);
5395 m_Connected =
false;
5406 TerminateProtocolThread();
5414 if(strLength < 1 || strLength > 300)
5441 return SetProperty(m_ColorDepth, pcolorDepth);
5444 virtual STDMETHODIMP IMsRdpClient::get_ColorDepth(
long * pcolorDepth)
const
5446 return GetProperty(m_ColorDepth, pcolorDepth);
5451 return GetAdvancedSettings(ppAdvSettings);
5456 return GetSecuredSettings(ppSecuredSettings);
5461 return GetProperty(m_ExtendedDisconnectReason, pExtendedDisconnectReason);
5469 if(pfFullScreen && !m_SecuredSettingsEnabled)
5478 return GetProperty(m_FullScreen, pfFullScreen);
5486 virtual STDMETHODIMP IMsRdpClient::GetVirtualChannelOptions(
BSTR chanName,
long * pChanOptions)
5493 if(pCloseStatus ==
NULL)
5504 if(!
PostMessage(m_controlWindow, RDPC_WM_REQUEST_CLOSE, 0, 0))
5513 return GetAdvancedSettings(ppAdvSettings);
5518 return SetProperty(m_ConnectedStatusText, pConnectedStatusText);
5523 return GetProperty(m_ConnectedStatusText, pConnectedStatusText);
5529 return GetAdvancedSettings(ppAdvSettings);
5535 return GetAdvancedSettings(ppAdvSettings5);
5541 return SetProperty(m_ClearTextPassword, rhs);
5586 return SetProperty(m_ClearTextPassword,
NULL);
5603 virtual STDMETHODIMP IMsRdpClientNonScriptable2::put_UIParentWindowHandle(
HWND phwndUIParentWindowHandle)
5605 return SetProperty(m_UIParentWindowHandle, phwndUIParentWindowHandle);
5608 virtual STDMETHODIMP IMsRdpClientNonScriptable2::get_UIParentWindowHandle(
HWND * phwndUIParentWindowHandle)
const
5610 return GetProperty(m_UIParentWindowHandle, phwndUIParentWindowHandle);
5624 RdpClient::InnerToOuter(
This)->GetUI()->Display_BeginUpdate();
5629 RdpClient::InnerToOuter(
This)->GetUI()->Display_EndUpdate();
5634 RdpClient::InnerToOuter(
This)->GetUI()->Display_SetClip(
x,
y,
cx,
cy);
5639 RdpClient::InnerToOuter(
This)->GetUI()->Display_ResetClip();
5645 RdpClient::InnerToOuter(
This)->GetUI()->Display_DestBlt(opcode,
x,
y,
cx,
cy);
5650 RdpClient::InnerToOuter(
This)->GetUI()->Display_MemBlt(opcode,
x,
y,
cx,
cy,
src, srcx, srcy);
5655 RdpClient::InnerToOuter(
This)->GetUI()->Display_PatBlt(opcode,
x,
y,
cx,
cy, brush, bgcolour, fgcolour);
5660 RdpClient::InnerToOuter(
This)->GetUI()->Display_ScreenBlt(opcode,
x,
y,
cx,
cy, srcx, srcy);
5663void ui_triblt(
RDPCLIENT *
This,
uint8 opcode,
int x,
int y,
int cx,
int cy,
HBITMAP src,
int srcx,
int srcy,
BRUSH * brush,
int bgcolour,
int fgcolour)
5665 RdpClient::InnerToOuter(
This)->GetUI()->Display_TriBlt(opcode,
x,
y,
cx,
cy,
src, srcx, srcy, brush, bgcolour, fgcolour);
5682 RdpClient::InnerToOuter(
This)->GetUI()->Display_Line(opcode, startx, starty, endx, endy, pen);
5687 RdpClient::InnerToOuter(
This)->GetUI()->Display_Polygon(opcode, fillmode,
point, npoints, brush, bgcolour, fgcolour);
5692 RdpClient::InnerToOuter(
This)->GetUI()->Display_Polyline(opcode,
points, npoints, pen);
5697 RdpClient::InnerToOuter(
This)->GetUI()->Display_Rect(
x,
y,
cx,
cy, colour);
5725 RdpClient::InnerToOuter(
This)->GetUI()->Display_DrawText
5752 RdpClient::InnerToOuter(
This)->GetUI()->Display_SaveDesktop(
offset,
x,
y,
cx,
cy);
5757 RdpClient::InnerToOuter(
This)->GetUI()->Display_RestoreDesktop(
offset,
x,
y,
cx,
cy);
5846 int b = 8 -
j % 8 - 1;
5902 if(!RdpClient::OnPublicKey(
This,
key, key_size))
5910 RdpClient::OnLogon(
This);
5913BOOL event_redirect(
RDPCLIENT *
This,
uint32 flags,
uint32 server_len,
wchar_t *
server,
uint32 cookie_len,
char *
cookie,
uint32 username_len,
wchar_t *
username,
uint32 domain_len,
wchar_t *
domain,
uint32 password_len,
wchar_t *
password)
5917 !RdpClient::OnRedirect
6017 rclsid == MSTSCLib::CLSID_MsTscAx ||
6018 rclsid == MSTSCLib::CLSID_MsRdpClient ||
6019 rclsid == MSTSCLib::CLSID_MsRdpClient2 ||
6020 rclsid == MSTSCLib::CLSID_MsRdpClient3 ||
6021 rclsid == MSTSCLib::CLSID_MsRdpClient4
6026 rclsid == MSTSCLib_Redist::CLSID_MsTscAx ||
6027 rclsid == MSTSCLib_Redist::CLSID_MsRdpClient ||
6028 rclsid == MSTSCLib_Redist::CLSID_MsRdpClient2 ||
6029 rclsid == MSTSCLib_Redist::CLSID_MsRdpClient3
6072 if(!RdpClient::Startup())
6084 RdpClient::Shutdown();
void ui_draw_text(RDPCLIENT *This, uint8 font, uint8 flags, uint8 opcode, int mixmode, int x, int y, int clipx, int clipy, int clipcx, int clipcy, int boxx, int boxy, int boxcx, int boxcy, BRUSH *brush, int bgcolour, int fgcolour, uint8 *text, uint8 length)
void ui_line(RDPCLIENT *This, uint8 opcode, int startx, int starty, int endx, int endy, PEN *pen)
void ui_polygon(RDPCLIENT *This, uint8 opcode, uint8 fillmode, POINT *point, int npoints, BRUSH *brush, int bgcolour, int fgcolour)
void ui_desktop_save(RDPCLIENT *This, uint32 offset, int x, int y, int cx, int cy)
BOOL event_redirect(RDPCLIENT *This, uint32 flags, uint32 server_len, wchar_t *server, uint32 cookie_len, char *cookie, uint32 username_len, wchar_t *username, uint32 domain_len, wchar_t *domain, uint32 password_len, wchar_t *password)
void ui_move_pointer(RDPCLIENT *This, int x, int y)
void ui_set_colourmap(RDPCLIENT *This, HCOLOURMAP map)
BOOL event_pubkey(RDPCLIENT *This, unsigned char *key, unsigned int key_size)
DWORD WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, LPVOID lpvReserved)
void ui_screenblt(RDPCLIENT *This, uint8 opcode, int x, int y, int cx, int cy, int srcx, int srcy)
void ui_patblt(RDPCLIENT *This, uint8 opcode, int x, int y, int cx, int cy, BRUSH *brush, int bgcolour, int fgcolour)
void ui_destroy_glyph(RDPCLIENT *, HGLYPH glyph)
int ui_select(RDPCLIENT *This, SOCKET rdp_socket)
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
void ui_paint_bitmap(RDPCLIENT *This, int x, int y, int cx, int cy, int width, int height, uint8 *data)
void ui_set_cursor(RDPCLIENT *This, HCURSOR cursor)
HBITMAP ui_create_bitmap(RDPCLIENT *This, int width, int height, uint8 *data)
void ui_set_clip(RDPCLIENT *This, int x, int y, int cx, int cy)
void ui_destroy_cursor(RDPCLIENT *, HCURSOR cursor)
HCURSOR ui_create_cursor(RDPCLIENT *This, unsigned int x, unsigned int y, int width, int height, uint8 *andmask, uint8 *xormask)
void ui_ellipse(RDPCLIENT *This, uint8 opcode, uint8 fillmode, int x, int y, int cx, int cy, BRUSH *brush, int bgcolour, int fgcolour)
void ui_destblt(RDPCLIENT *This, uint8 opcode, int x, int y, int cx, int cy)
void ui_desktop_restore(RDPCLIENT *This, uint32 offset, int x, int y, int cx, int cy)
void ui_polyline(RDPCLIENT *This, uint8 opcode, POINT *points, int npoints, PEN *pen)
void ui_memblt(RDPCLIENT *This, uint8 opcode, int x, int y, int cx, int cy, HBITMAP src, int srcx, int srcy)
HGLYPH ui_create_glyph(RDPCLIENT *This, int width, int height, const uint8 *data)
void ui_triblt(RDPCLIENT *This, uint8 opcode, int x, int y, int cx, int cy, HBITMAP src, int srcx, int srcy, BRUSH *brush, int bgcolour, int fgcolour)
STDAPI DllCanUnloadNow(void)
void ui_rect(RDPCLIENT *This, int x, int y, int cx, int cy, int colour)
HCOLOURMAP ui_create_colourmap(RDPCLIENT *, COLOURMAP *colours)
void ui_destroy_bitmap(RDPCLIENT *, HBITMAP bmp)
void event_logon(RDPCLIENT *This)
static DWORD const fdwReason
#define InterlockedIncrement
#define InterlockedDecrement
void cache_put_text(uint8 cache_id, void *data, int length)
FONTGLYPH * cache_get_font(uint8 font, uint16 character)
void cache_put_desktop(uint32 offset, int cx, int cy, int scanline, int bytes_per_pixel, uint8 *data)
DATABLOB * cache_get_text(uint8 cache_id)
uint8 * cache_get_desktop(uint32 offset, int cx, int cy, int bytes_per_pixel)
#define exDiscReasonNoInfo
void rdp_disconnect(void)
void ui_set_null_cursor(void)
RD_BOOL rdp_connect(char *server, uint32 flags, char *domain, char *password, char *command, char *directory, RD_BOOL reconnect)
void ui_resize_window(void)
void rdp_reset_state(void)
void ui_begin_update(void)
void rdp_main_loop(RD_BOOL *deactivated, uint32 *ext_disc_reason)
const GUID IID_IClassFactory
#define STDMETHODCALLTYPE
void Display_DoGlyph(uint8 font, uint8 flags, int mixmode, int &x, int &y, int bgcolour, int fgcolour, const uint8 *ttext, int &idx)
void Display_RepaintPolygon(POINT *point, int npoints, int linewidth)
LRESULT InputWindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
LONG m_displayBufferHeight
void Display_Rect(int x, int y, int cx, int cy, int colour)
void Display_DrawGlyph(int mixmode, int x, int y, int cx, int cy, HGLYPH glyph, int srcx, int srcy, int bgcolour, int fgcolour)
LRESULT UIWindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
int m_displayBufferByteDepth
LRESULT ConsoleWindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
void Display_BeginUpdate()
void Display_SaveDesktop(uint32 offset, int x, int y, int cx, int cy)
void Display_RepaintRect(const RECT *lprc)
void * m_displayBufferRaw
void Display_Line(uint8 opcode, int startx, int starty, int endx, int endy, PEN *pen)
void Display_RepaintArea(int x, int y, int cx, int cy)
void Display_DrawText(uint8 font, uint8 flags, uint8 opcode, int mixmode, int x, int y, int clipx, int clipy, int clipcx, int clipcy, int boxx, int boxy, int boxcx, int boxcy, BRUSH *brush, int bgcolour, int fgcolour, uint8 *text, uint8 length)
void Display_PatBlt(uint8 opcode, int x, int y, int cx, int cy, BRUSH *brush, int bgcolour, int fgcolour)
void Display_PaintBitmap(int x, int y, int cx, int cy, int width, int height, uint8 *data)
LRESULT DisplayWindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
HRESULT Initialize(HWND hwndParent)
LONG m_displayBufferWidth
void Display_TriBlt(uint8 opcode, int x, int y, int cx, int cy, HBITMAP src, int srcx, int srcy, BRUSH *brush, int bgcolour, int fgcolour)
void Display_ScreenBlt(uint8 opcode, int x, int y, int cx, int cy, int srcx, int srcy)
void Display_RestoreDesktop(uint32 offset, int x, int y, int cx, int cy)
void Display_Polyline(uint8 opcode, POINT *points, int npoints, PEN *pen)
void Display_RepaintAll()
int m_displayBufferStride
void Display_DestBlt(uint8 opcode, int x, int y, int cx, int cy)
void Display_MemBlt(uint8 opcode, int x, int y, int cx, int cy, HBITMAP src, int srcx, int srcy)
void Display_Ellypse(uint8 opcode, uint8 fillmode, int x, int y, int cx, int cy, BRUSH *brush, int bgcolour, int fgcolour)
HWND m_fullScreenBarWindow
void Display_Polygon(uint8 opcode, uint8 fillmode, POINT *point, int npoints, BRUSH *brush, int bgcolour, int fgcolour)
void Display_SetClip(int x, int y, int cx, int cy)
CRITICAL_SECTION m_displayBufferMutex
int m_displayBufferBitDepth
CEnumConnectionPoints(IConnectionPoint *cp)
virtual STDMETHODIMP Clone(IEnumConnectionPoints **ppEnum)
virtual STDMETHODIMP QueryInterface(REFIID riid, void **ppvObject)
virtual STDMETHODIMP_(ULONG) AddRef()
virtual STDMETHODIMP Next(ULONG cConnections, LPCONNECTIONPOINT *ppCP, ULONG *pcFetched)
CEnumConnectionPoints(const CEnumConnectionPoints &ecp)
virtual STDMETHODIMP Reset()
virtual STDMETHODIMP_(ULONG) Release()
virtual STDMETHODIMP Skip(ULONG cConnections)
virtual STDMETHODIMP_(ULONG) IUnknown
HRESULT LoadDispTypeInfo()
const RdpClient * Outer() const
HRESULT AcquireDispTypeInfo(ITypeInfo **ppTI)
virtual STDMETHODIMP_(ULONG) IUnknown
ITypeInfo * m_dispTypeInfo
bool IsSafeForScripting() const
bool m_ConnectionBarShowMinimizeButton
bool m_ContainerHandledFullScreen
HRESULT SetProperty(bool &prop, const Type &newValue)
void FireFatalError(long errorCode)
void CleanupEventArgumentsCallback(DISPID eventId, VARIANTARG *rgvarg, unsigned int cArgs, VARIANTARG *retVal)
void FireIdleTimeoutNotification()
ITypeInfo * m_dispTypeInfo
virtual STDMETHODIMP EnumConnections(IEnumConnections **ppEnum)
HRESULT SetProperty(Type &prop, const Type &newValue)
void FireAuthenticationWarningDisplayed()
void FireEnterFullScreenMode()
bool m_ConnectToServerConsole
static VOID CALLBACK DisconnectAPC(ULONG_PTR)
bool m_SecuredSettingsEnabled
bool HandleEvent(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &result)
static bool OnPublicKey(RDPCLIENT *This, unsigned char *key, unsigned int key_size)
HRESULT ReplaceProperty(LPSTR &prop, LPSTR newValue)
long m_minInputSendInterval
BSTR m_ConnectedStatusText
void FireRemoteDesktopSizeChange(long width, long height)
void FireRequestLeaveFullScreen()
BSTR m_KeyboardLayoutString
HRESULT DestroyControlWindow()
void PerformDisconnect(long reason)
static RdpClient * InnerToOuter(RdpClientInner *innerThis)
HRESULT SetProperty(BSTR &prop, BSTR newValue)
HRESULT GetProperty(const Type &prop, Type *retVal) const
SEALED_::SEALED_ m_advancedSettings
virtual STDMETHODIMP Unadvise(DWORD dwCookie)
static RdpClient * InnerToOuter(AdvancedSettings *innerThis)
void JoinProtocolThread()
bool OnRedirect(uint32 flags, uint32 server_len, wchar_t *server, uint32 cookie_len, char *cookie, uint32 username_len, wchar_t *username, uint32 domain_len, wchar_t *domain, uint32 password_len, wchar_t *password)
HWND m_UIParentWindowHandle
RdpClientUI * GetUI() const
bool m_allowBackgroundInput
static LRESULT CALLBACK ControlWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static const RdpClient * InnerToOuter(const RDPCLIENT *innerThis)
RDPCLIENT m_protocolState
void InvokeSinks(DISPID eventId, VARIANTARG rgvarg[], unsigned int cArgs, VARIANTARG *retval)
bool m_ConnectionBarShowRestoreButton
HRESULT FireReceivedTSPublicKey(void *publicKey, unsigned int publicKeyLength)
HRESULT queryInterface(REFIID riid, void **ppvObject)
void FireEventOutsideApartment(DISPID eventId, VARIANTARG *rgvarg=NULL, unsigned int cArgs=0, VARIANTARG *retval=NULL, AsyncEventCallback callback=NULL)
BSTR m_RdpdrClipCleanTempDirString
HRESULT ReplaceProperty(BSTR &prop, BSTR newValue)
virtual STDMETHODIMP_(ULONG) IUnknown
long m_MinutesToIdleTimeout
static RdpClient * InnerToOuter(RDPCLIENT *innerThis)
HRESULT LoadDispTypeInfo()
HRESULT GetSecuredSettings(Interface **ppSecuredSettings)
SEALED_::RdpClientInner m_inner
static DWORD WINAPI ProtocolLoopThreadProc(LPVOID lpParam)
long m_MaxReconnectAttempts
bool m_EnableAutoReconnect
BSTR m_RdpdrLocalPrintingDocName
long m_overallConnectionTimeout
bool OnPublicKey(unsigned char *key, unsigned int key_size)
IOleInPlaceSite * m_inPlaceSite
bool m_DisplayConnectionBar
static RdpClient * InnerToOuter(SecuredSettings *innerThis)
unsigned int m_AuthenticationLevel
long m_AudioRedirectionMode
HRESULT GetAdvancedSettings(Interface **ppAdvSettings)
bool m_GrabFocusOnConnect
RdpClient(REFCLSID classId, unsigned libIndex, IUnknown *punkOuter)
static const RdpClient * InnerToOuter(const SecuredSettings *innerThis)
MSTSCLib::ExtendedDisconnectReasonCode m_ExtendedDisconnectReason
static bool OnRedirect(RDPCLIENT *This, uint32 flags, uint32 server_len, wchar_t *server, uint32 cookie_len, char *cookie, uint32 username_len, wchar_t *username, uint32 domain_len, wchar_t *domain, uint32 password_len, wchar_t *password)
IOleAdviseHolder * m_adviseHolder
HRESULT SetProperty(LPSTR &prop, BSTR newValue)
long m_BitmapVirtualCache16BppSize
LONG FireAutoReconnecting(long disconnectReason, long attemptCount)
HRESULT CreateControlWindow(HWND hwndParent)
void FireEventInsideApartment(DISPID eventId, VARIANTARG *rgvarg=NULL, unsigned int cArgs=0, VARIANTARG *retval=NULL, AsyncEventCallback callback=NULL)
static HRESULT CreateInstance(REFCLSID rclsid, unsigned libIndex, IUnknown *punkOuter, REFIID riid, void **ppObj)
HRESULT GetProperty(const bool &prop, Type *retVal) const
void FireFatalErrorFromApartment(long errorCode)
void FireRequestContainerMinimize()
long m_singleConnectionTimeout
virtual STDMETHODIMP Advise(IUnknown *pUnkSink, DWORD *pdwCookie)
HRESULT FireChannelReceivedData(char(&chanName)[CHANNEL_NAME_LEN+1], void *chanData, unsigned int chanDataSize)
HRESULT GetProperty(BSTR &prop, BSTR *retVal) const
void FireAuthenticationWarningDismissed()
static const RdpClient * InnerToOuter(const RdpClientInner *innerThis)
HRESULT LoadTypeLibrary()
HRESULT Activate(LONG iVerb, IOleClientSite *pActiveSite, HWND hwndParent, LPCRECT lprcPosRect)
IOleClientSite * m_clientSite
MSTSCLib::IMsTscAxEvents ** GetSinks() const
HRESULT GetProperty(LPSTR &prop, BSTR *retVal) const
LRESULT ControlWindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
virtual STDMETHODIMP GetConnectionPointContainer(IConnectionPointContainer **ppCPC)
BSTR m_RdpdrClipPasteInfoString
bool m_AcceleratorPassthrough
HANDLE m_protocolThreadWaitingReconnection
bool m_RedirectSmartCards
void FireLeaveFullScreenMode()
void FireDisconnected(long reason)
SEALED_::SEALED_ m_securedSettings
virtual STDMETHODIMP GetConnectionInterface(IID *pIID)
long m_BitmapVirtualCacheSize
void TerminateProtocolThread()
bool m_CachePersistenceActive
bool m_ScaleBitmapCachesByBpp
HRESULT AcquireDispTypeInfo(ITypeInfo **ppTI)
void FireRequestGoFullScreen()
void FireWarning(long warningCode)
HRESULT FireEventOutsideApartmentAsync(DISPID eventId, VARIANTARG *rgvarg=NULL, unsigned int cArgs=0, VARIANTARG *retval=NULL, AsyncEventCallback callback=NULL)
static void OnLogon(RDPCLIENT *This)
long m_BitmapVirtualCache24BppSize
static const RdpClient * InnerToOuter(const AdvancedSettings *innerThis)
static VOID CALLBACK ConnectionTimerAPC(LPVOID, DWORD, DWORD)
MSTSCLib::IMsTscAxEvents ** m_EventSinks
HRESULT NeedAdviseHolder()
BOOL WINAPI GetComputerNameW(LPWSTR lpBuffer, LPDWORD lpnSize)
_In_ size_t const _In_ int _In_ bool const _In_ unsigned const _In_ __acrt_rounding_mode const _Inout_ __crt_cached_ptd_host & ptd
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
#define DLL_PROCESS_ATTACH
#define DLL_PROCESS_DETACH
#define WideCharToMultiByte
#define MultiByteToWideChar
static const WCHAR version[]
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
DWORD WINAPI QueueUserAPC(IN PAPCFUNC pfnAPC, IN HANDLE hThread, IN ULONG_PTR dwData)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
HRESULT WINAPI OleRegGetUserType(REFCLSID clsid, DWORD form, LPOLESTR *usertype)
HRESULT WINAPI OleRegGetMiscStatus(REFCLSID clsid, DWORD dwAspect, DWORD *pdwStatus)
HRESULT WINAPI OleRegEnumVerbs(REFCLSID clsid, LPENUMOLEVERB *ppenum)
HRESULT WINAPI LoadTypeLibEx(LPCOLESTR szFile, REGKIND regkind, ITypeLib **pptLib)
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
int align(int length, int align)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLboolean GLboolean GLboolean b
GLenum const GLfloat * params
GLuint GLsizei GLsizei * length
GLsizei GLenum GLboolean sink
GLsizei const GLfloat * points
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
_Check_return_opt_ _CRTIMP int __cdecl fputs(_In_z_ const char *_Str, _Inout_ FILE *_File)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
_Check_return_opt_ _CRTIMP int __cdecl fputc(_In_ int _Ch, _Inout_ FILE *_File)
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
HRESULT EnumConnectionPoints([out] IEnumConnectionPoints **ppEnum)
HRESULT FindConnectionPoint([in] REFIID riid, [out] IConnectionPoint **ppCP)
HRESULT GetDataHere([in, unique] FORMATETC *pformatetc, [in, out] STGMEDIUM *pmedium)
HRESULT DUnadvise([in] DWORD dwConnection)
HRESULT SetData([in, unique] FORMATETC *pformatetc, [in, unique] STGMEDIUM *pmedium, [in] BOOL fRelease)
HRESULT DAdvise([in] FORMATETC *pformatetc, [in] DWORD advf, [in, unique] IAdviseSink *pAdvSink, [out] DWORD *pdwConnection)
HRESULT GetData([in, unique] FORMATETC *pformatetcIn, [out] STGMEDIUM *pmedium)
HRESULT QueryGetData([in, unique] FORMATETC *pformatetc)
HRESULT GetCanonicalFormatEtc([in, unique] FORMATETC *pformatectIn, [out] FORMATETC *pformatetcOut)
HRESULT EnumFormatEtc([in] DWORD dwDirection, [out] IEnumFORMATETC **ppenumFormatEtc)
HRESULT EnumDAdvise([out] IEnumSTATDATA **ppenumAdvise)
HRESULT GetTypeInfoCount([out] UINT *pctinfo)
HRESULT GetTypeInfo([in] UINT iTInfo, [in] LCID lcid, [out] ITypeInfo **ppTInfo)
HRESULT Invoke([in] DISPID dispIdMember, [in] REFIID riid, [in] LCID lcid, [in] WORD wFlags, [in, out] DISPPARAMS *pDispParams, [out] VARIANT *pVarResult, [out] EXCEPINFO *pExcepInfo, [out] UINT *puArgErr)
HRESULT GetIDsOfNames([in] REFIID riid, [in, size_is(cNames)] LPOLESTR *rgszNames, [in] UINT cNames, [in] LCID lcid, [out, size_is(cNames)] DISPID *rgDispId)
HRESULT GetInterfaceSafetyOptions([in] REFIID riid, [out] DWORD *pdwSupportedOptions, [out] DWORD *pdwEnabledOptions)
HRESULT SetInterfaceSafetyOptions([in] REFIID riid, [in] DWORD dwOptionSetMask, [in] DWORD dwEnabledOptions)
HRESULT EnumAdvise([out] IEnumSTATDATA **ppenumAdvise)
HRESULT Unadvise([in] DWORD dwConnection)
HRESULT Advise([in, unique] IAdviseSink *pAdvise, [out] DWORD *pdwConnection)
HRESULT FreezeEvents([in] BOOL bFreeze)
HRESULT OnAmbientPropertyChange([in] DISPID dispID)
HRESULT OnMnemonic([in] MSG *pMsg)
HRESULT GetControlInfo([out] CONTROLINFO *pCI)
HRESULT ResizeBorder([in] LPCRECT prcBorder, [in, unique] IOleInPlaceUIWindow *pUIWindow, [in] BOOL fFrameWindow)
HRESULT TranslateAccelerator([in] LPMSG lpmsg)
HRESULT OnDocWindowActivate([in] BOOL fActivate)
HRESULT EnableModeless([in] BOOL fEnable)
HRESULT OnFrameWindowActivate([in] BOOL fActivate)
HRESULT InPlaceDeactivate()
HRESULT SetObjectRects([in] LPCRECT lprcPosRect, [in] LPCRECT lprcClipRect)
HRESULT ReactivateAndUndo()
HRESULT SetActiveObject([in, unique] IOleInPlaceActiveObject *pActiveObject, [in, string, unique] LPCOLESTR pszObjName)
HRESULT SetBorderSpace([in, unique] LPCBORDERWIDTHS pborderwidths)
HRESULT SetMoniker([in] DWORD dwWhichMoniker, [in, unique] IMoniker *pmk)
HRESULT SetExtent([in] DWORD dwDrawAspect, [in] SIZEL *psizel)
HRESULT GetUserType([in] DWORD dwFormOfType, [out] LPOLESTR *pszUserType)
HRESULT SetHostNames([in] LPCOLESTR szContainerApp, [in, unique] LPCOLESTR szContainerObj)
HRESULT GetMiscStatus([in] DWORD dwAspect, [out] DWORD *pdwStatus)
HRESULT GetUserClassID([out] CLSID *pClsid)
HRESULT GetClipboardData([in] DWORD dwReserved, [out] IDataObject **ppDataObject)
HRESULT GetClientSite([out] IOleClientSite **ppClientSite)
HRESULT GetExtent([in] DWORD dwDrawAspect, [out] SIZEL *psizel)
HRESULT EnumVerbs([out] IEnumOLEVERB **ppEnumOleVerb)
HRESULT SetClientSite([in, unique] IOleClientSite *pClientSite)
HRESULT GetMoniker([in] DWORD dwAssign, [in] DWORD dwWhichMoniker, [out] IMoniker **ppmk)
HRESULT Close([in] DWORD dwSaveOption)
HRESULT EnumAdvise([out] IEnumSTATDATA **ppenumAdvise)
HRESULT Unadvise([in] DWORD dwConnection)
HRESULT InitFromData([in, unique] IDataObject *pDataObject, [in] BOOL fCreation, [in] DWORD dwReserved)
HRESULT DoVerb([in] LONG iVerb, [in, unique] LPMSG lpmsg, [in, unique] IOleClientSite *pActiveSite, [in] LONG lindex, [in] HWND hwndParent, [in, unique] LPCRECT lprcPosRect)
HRESULT Advise([in, unique] IAdviseSink *pAdvSink, [out] DWORD *pdwConnection)
HRESULT SetColorScheme([in] LOGPALETTE *pLogpal)
HRESULT GetWindow([out] HWND *phwnd)
HRESULT ContextSensitiveHelp([in] BOOL fEnterMode)
HRESULT Load([in] IPropertyBag *pPropBag, [in] IErrorLog *pErrorLog)
HRESULT Save([in] IPropertyBag *pPropBag, [in] BOOL fClearDirty, [in] BOOL fSaveAllProperties)
HRESULT HandsOffStorage()
HRESULT Save([in, unique] IStorage *pStgSave, [in] BOOL fSameAsLoad)
HRESULT SaveCompleted([in, unique] IStorage *pStgNew)
HRESULT InitNew([in, unique] IStorage *pStg)
HRESULT Load([in, unique] IStorage *pStg)
HRESULT Save([in] LPSTREAM pStm, [in] BOOL fClearDirty)
HRESULT Load([in] LPSTREAM pStm)
HRESULT GetSizeMax([out] ULARGE_INTEGER *pcbSize)
HRESULT GetClassID([out] CLSID *pClassID)
HRESULT GetGUID([in] DWORD dwGuidKind, [out] GUID *pGUID)
HRESULT GetClassInfo([out] ITypeInfo **ppTI)
HRESULT QuickActivate([in] QACONTAINER *pQaContainer, [in, out] QACONTROL *pQaControl)
HRESULT SetContentExtent([in] LPSIZEL pSizel)
HRESULT GetContentExtent([out] LPSIZEL pSizel)
HRESULT Invoke([in] PVOID pvInstance, [in] MEMBERID memid, [in] WORD wFlags, [in, out] DISPPARAMS *pDispParams, [out] VARIANT *pVarResult, [out] EXCEPINFO *pExcepInfo, [out] UINT *puArgErr)
HRESULT GetIDsOfNames([in, size_is(cNames)] LPOLESTR *rgszNames, [in] UINT cNames, [out, size_is(cNames)] MEMBERID *pMemId)
HRESULT GetTypeInfoOfGuid([in] REFGUID guid, [out] ITypeInfo **ppTinfo)
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
HRESULT GetExtent([in] DWORD dwDrawAspect, [in] LONG lindex, [in, unique] DVTARGETDEVICE *ptd, [out] LPSIZEL lpsizel)
HRESULT GetColorSet([in] DWORD dwDrawAspect, [in] LONG lindex, [in, unique] void *pvAspect, [in, unique] DVTARGETDEVICE *ptd, [in] HDC hicTargetDev, [out] LOGPALETTE **ppColorSet)
HRESULT Freeze([in] DWORD dwDrawAspect, [in] LONG lindex, [in, unique] void *pvAspect, [out] DWORD *pdwFreeze)
HRESULT Draw([in] DWORD dwDrawAspect, [in] LONG lindex, [in, unique] void *pvAspect, [in, unique] DVTARGETDEVICE *ptd, [in] HDC hdcTargetDev, [in] HDC hdcDraw, [in] LPCRECTL lprcBounds, [in, unique] LPCRECTL lprcWBounds, [in] BOOL(*pfnContinue)(ULONG_PTR dwContinue), [in] ULONG_PTR dwContinue)
HRESULT Unfreeze([in] DWORD dwFreeze)
HRESULT SetAdvise([in] DWORD aspects, [in] DWORD advf, [in, unique] IAdviseSink *pAdvSink)
HRESULT GetAdvise([out, unique] DWORD *pAspects, [out, unique] DWORD *pAdvf, [out] IAdviseSink **ppAdvSink)
nsresult QueryInterface(nsIIDRef riid, void **result)
static IN DWORD IN LPVOID lpvReserved
#define memcpy(s1, s2, n)
#define RDP_LOGON_COMPRESSION
#define RDP_LOGON_LEAVE_AUDIO
#define RDP_LOGON_COMPRESSION2
BOOL rdp_reconnect(RDPCLIENT *This, char *server, uint32 flags, wchar_t *username, wchar_t *domain, wchar_t *password, wchar_t *command, wchar_t *directory, wchar_t *hostname, char *cookie)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static IPrintDialogCallback callback
static DWORD DWORD void LPSTR DWORD cch
static HMODULE MODULEINFO DWORD cb
static IActiveScriptSite * site
static ULONG WINAPI AddRef(IStream *iface)
static VARIANTARG static DISPID
EXTERN_C const IID IID_IMsRdpClientNonScriptable2
EXTERN_C const IID IID_IMsTscAdvancedSettings
interface IMsRdpClientNonScriptable IMsRdpClientNonScriptable
EXTERN_C const IID IID_IMsRdpClient4
interface IMsRdpClient4 IMsRdpClient4
EXTERN_C const IID IID_IMsTscAx
EXTERN_C const IID IID_IMsRdpClientNonScriptable
EXTERN_C const IID IID_IMsRdpClient2
EXTERN_C const IID IID_IMsRdpClientAdvancedSettings4
EXTERN_C const IID IID_IMsRdpClient3
EXTERN_C const IID IID_IMsRdpClientAdvancedSettings2
interface IMsTscNonScriptable IMsTscNonScriptable
EXTERN_C const IID IID_IMsRdpClient
EXTERN_C const IID IID_IMsRdpClientAdvancedSettings3
EXTERN_C const IID IID_IMsTscSecuredSettings
interface IMsRdpClient IMsRdpClient
EXTERN_C const IID IID_IMsRdpClientSecuredSettings
interface IMsRdpClient2 IMsRdpClient2
EXTERN_C const IID IID_IMsTscNonScriptable
interface IMsRdpClientNonScriptable2 IMsRdpClientNonScriptable2
interface IMsTscAx IMsTscAx
EXTERN_C const IID IID_IMsRdpClientAdvancedSettings
interface IMsRdpClient3 IMsRdpClient3
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
@ controlCloseWaitForEvents
@ autoReconnectContinueStop
@ autoReconnectContinueAutomatic
@ autoReconnectContinueManual
unsigned __int3264 UINT_PTR
enum MSTSCLib::__MIDL_IMsRdpClient_0001 ExtendedDisconnectReasonCode
enum MSTSCLib::__MIDL_IMsRdpClient_0002 ControlCloseStatus
HBRUSH win32_create_brush(BRUSH *brush, COLORREF fgcolour)
void FreeLpsz(LPSTR lpsz)
HBITMAP win32_create_dib(LONG width, LONG height, WORD bitcount, const BYTE *data)
BSTR LpszToBstr(LPSTR lpsz)
uint8 * win32_convert_scanlines(int width, int height, int bitcount, int fromalign, int toalign, const uint8 *data, uint8 **buffer)
T alignup(const T &X, const U &align)
LPSTR BstrToLpsz(BSTR bstr)
LPSTR AllocLpsz(const CHAR *lpsz, size_t cb)
HMODULE GetCurrentModule()
T aligndown(const T &X, const U &align)
void swap(StackAllocator< _Tp > &__a, StackAllocator< _Tp > &__b)
#define DEFAULT_UNREACHABLE
#define RTL_FIELD_TYPE(type, field)
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
interface IStream * LPSTREAM
#define OLEIVERB_UIACTIVATE
#define OLEIVERB_INPLACEACTIVATE
HRESULT WINAPI CreateOleAdviseHolder(IOleAdviseHolder **ppOAHolder)
BSTR WINAPI SysAllocString(LPCOLESTR str)
UINT WINAPI SysStringLen(BSTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
BSTR WINAPI DECLSPEC_HOTPATCH SysAllocStringByteLen(LPCSTR str, UINT len)
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
#define CONNECT_E_CANNOTCONNECT
#define CONNECT_E_NOCONNECTION
const GUID IID_IOleInPlaceActiveObject
const GUID IID_IViewObject
const GUID IID_IConnectionPointContainer
const GUID IID_IOleWindow
const GUID IID_IViewObject2
const GUID IID_IDataObject
const GUID IID_IOleInPlaceObject
const GUID IID_IEnumConnectionPoints
const GUID IID_IPersistStorage
const GUID IID_IOleObject
const GUID IID_IOleControl
const GUID IID_IPersistStreamInit
BOOL Polygon(CONST PPOINT UnsafePoints, int Count, int polyFillMode)
const GUID IID_IPersistPropertyBag
_Out_opt_ int _Out_opt_ int * cy
#define SUBLANG_ENGLISH_US
BOOL WINAPI SHIM_OBJ_NAME() GetComputerNameA(LPSTR lpBuffer, LPDWORD lpnSize)
virtual STDMETHODIMP_(ULONG) Release()
virtual STDMETHODIMP CreateInstance(IUnknown *pUnkOuter, REFIID riid, void **ppvObject)
virtual STDMETHODIMP LockServer(BOOL fLock)
virtual STDMETHODIMP QueryInterface(REFIID riid, void **ppvObject)
ClassFactory(REFCLSID rclsid, unsigned libIndex)
virtual STDMETHODIMP_(ULONG) AddRef()
IOleClientSite * pClientSite
IAdviseSinkEx * pAdviseSink
AsyncEventCallback callback
BOOL bitmap_cache_persist_enable
struct rdpclient::rdp_ rdp
int keyboard_functionkeys
BOOL bitmap_cache_precache
struct rdpclient::cache_ cache
char licence_hostname[MAX_COMPUTERNAME_LENGTH+1]
uint32 rdp5_performanceflags
BOOL polygon_ellipse_orders
DWORD WINAPI SleepEx(IN DWORD dwMilliseconds, IN BOOL bAlertable)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
BOOL WINAPI SetWaitableTimer(IN HANDLE hTimer, IN const LARGE_INTEGER *pDueTime, IN LONG lPeriod, IN PTIMERAPCROUTINE pfnCompletionRoutine OPTIONAL, IN OPTIONAL LPVOID lpArgToCompletionRoutine, IN BOOL fResume)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
BOOL WINAPI CancelWaitableTimer(IN HANDLE hTimer)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define CONTAINING_RECORD(address, type, field)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
static rfbScreenInfoPtr server
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
#define success(from, fromstr, to, tostr)
DWORD WINAPI GetLastError(void)
DWORD WINAPI GetCurrentThreadId(void)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define WAIT_IO_COMPLETION
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define CreateWaitableTimer
#define MAX_COMPUTERNAME_LENGTH
_In_ DWORD _Out_ _In_ WORD wFlags
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
#define OLEOBJ_S_INVALIDVERB
#define CLASS_E_NOAGGREGATION
#define HRESULT_FROM_WIN32(x)
#define CLASS_E_CLASSNOTAVAILABLE
HGDIOBJ WINAPI GetStockObject(_In_ int)
BOOL WINAPI Polyline(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ int cpt)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
BOOL WINAPI SetBrushOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
HBRUSH WINAPI CreateHatchBrush(_In_ int, _In_ COLORREF)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
BOOL WINAPI GdiFlush(void)
BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
BOOL WINAPI StretchBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
BOOL WINAPI RestoreDC(_In_ HDC, _In_ int)
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
int WINAPI SetROP2(_In_ HDC, _In_ int)
HRGN WINAPI CreateRectRgnIndirect(_In_ LPCRECT)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
BOOL WINAPI DeleteDC(_In_ HDC)
HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF)
int WINAPI SelectClipRgn(_In_ HDC, _In_opt_ HRGN)
HBITMAP WINAPI CreateDIBitmap(_In_ HDC hdc, _In_opt_ const BITMAPINFOHEADER *pbmih, _In_ DWORD fdwInit, _In_opt_ const VOID *pvInit, _In_opt_ const BITMAPINFO *pbmi, _In_ UINT uUsage)
BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int)
int WINAPI SetStretchBltMode(_In_ HDC, _In_ int)
int WINAPI SaveDC(_In_ HDC)
HBRUSH WINAPI CreatePatternBrush(_In_ HBITMAP)
int WINAPI SetPolyFillMode(_In_ HDC, _In_ int)
DWORD WINAPI GetSysColor(_In_ int)
BOOL WINAPI IsWindow(_In_opt_ HWND)
BOOL WINAPI ReplyMessage(_In_ LRESULT)
HKL WINAPI GetKeyboardLayout(_In_ DWORD)
HICON WINAPI CreateIconIndirect(_In_ PICONINFO)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
int WINAPI SetWindowRgn(_In_ HWND, _In_opt_ HRGN, _In_ BOOL)
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
BOOL WINAPI MessageBeep(_In_ UINT uType)
BOOL WINAPI IsIconic(_In_ HWND)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI InSendMessage(void)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
BOOL WINAPI IntersectRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
BOOL WINAPI InvalidateRgn(_In_ HWND, _In_opt_ HRGN, _In_ BOOL)
_In_ int _Inout_ LPRECT lprc
int WINAPI GetKeyboardType(_In_ int)
int WINAPI SetScrollInfo(_In_ HWND, _In_ int, _In_ LPCSCROLLINFO, _In_ BOOL)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
BOOL WINAPI GetScrollInfo(_In_ HWND, _In_ int, _Inout_ LPSCROLLINFO)
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
BOOL WINAPI DestroyIcon(_In_ HICON)