ReactOS 0.4.16-dev-87-g3dfbe52
mstscax.cpp
Go to the documentation of this file.
1#include "stdafx.h"
2
3namespace
4{
5 using namespace MSTSCLib;
6
10
14
16
17 extern "C" char __ImageBase;
18 static const HMODULE hmSelf = reinterpret_cast<HMODULE>(&__ImageBase);
19
20 void init()
21 {
22 if(hmMstscax)
23 return;
24
25 TCHAR szFileName[MAX_PATH + 1];
26 GetModuleFileName(hmSelf, szFileName, MAX_PATH);
27
28 std::basic_string<TCHAR> strFileName(&szFileName[0]);
29 std::reverse_iterator<std::basic_string<TCHAR>::const_iterator > begin(strFileName.end());
30 std::reverse_iterator<std::basic_string<TCHAR>::const_iterator > end(strFileName.begin());
31 std::basic_string<TCHAR>::const_iterator endPath = std::find(begin, end, TEXT('\\')).base();
32
33 std::basic_string<TCHAR> strPath(strFileName.begin(), endPath);
34 strPath.append(TEXT("original\\mstscax.dll"));
35
36 hmMstscax = LoadLibrary(strPath.c_str());
40 }
41
43 {
44 TCHAR buf[0x1000];
45
48 StringCbVPrintf(buf, sizeof(buf), fmt, args);
49 va_end(args);
50
51 StringCbCat(buf, sizeof(buf), TEXT("\n"));
52
54 }
55
56#if 0
57 const IID MsTscAxIIDs[] =
58 {
61 //IID_IMsTscAxEvents,
64 };
65
66 const IID MsRdpClient[] =
67 {
70 //IID_IMsTscAxEvents,
73 };
74
75 const IID MsRdpClient2[] =
76 {
80 //IID_IMsTscAxEvents,
83 };
84
85 const IID MsRdpClient3[] =
86 {
91 //IID_IMsTscAxEvents,
94 };
95
96 const IID MsRdpClient4[] =
97 {
103 //IID_IMsTscAxEvents,
107 };
108#endif
109
110 std::wstring UUIDToString(const UUID& uuid)
111 {
112 std::wstring s;
115 s += str;
117 return s;
118 }
119
120 std::wstring MonikerToString(IMoniker * pmk)
121 {
122 LPOLESTR pszName = NULL;
123
124 if(SUCCEEDED(pmk->GetDisplayName(NULL, NULL, &pszName)))
125 {
126 std::wstring s(pszName);
127 CoTaskMemFree(pszName);
128 return s;
129 }
130 else
131 return std::wstring(L"<error>");
132 }
133
134 std::basic_string<TCHAR> RectToString(const RECT& rc)
135 {
136 if(&rc == NULL)
137 return TEXT("<null>");
138
139 std::basic_ostringstream<TCHAR> o;
140 o << "{" << " left:" << rc.left << " top:" << rc.top << " right:" << rc.right << " bottom:" << rc.bottom << " }";
141 return o.str();
142 }
143
144 std::basic_string<TCHAR> RectToString(const RECTL& rc)
145 {
146 if(&rc == NULL)
147 return TEXT("<null>");
148
149 std::basic_ostringstream<TCHAR> o;
150 o << "{" << " left:" << rc.left << " top:" << rc.top << " right:" << rc.right << " bottom:" << rc.bottom << " }";
151 return o.str();
152 }
153
154 std::basic_string<TCHAR> SizeToString(const SIZE& sz)
155 {
156 if(&sz == NULL)
157 return TEXT("<null>");
158
159 std::basic_ostringstream<TCHAR> o;
160 o << "{ " << " cx:" << sz.cx << " cy:" << sz.cy << " }";
161 return o.str();
162 }
163
164 template<class T> LPCTSTR BooleanToString(const T& X)
165 {
166 return X ? TEXT("true") : TEXT("false");
167 }
168
169 std::basic_string<TCHAR> VariantToString(const VARIANT& var)
170 {
171 std::basic_ostringstream<TCHAR> o;
172
173 switch(var.vt & VT_TYPEMASK)
174 {
175 case VT_EMPTY: o << "<empty>"; break;
176 case VT_NULL: o << "<null>"; break;
177 case VT_I2: o << "short"; break;
178 case VT_I4: o << "long"; break;
179 case VT_R4: o << "float"; break;
180 case VT_R8: o << "double"; break;
181 case VT_CY: o << "CURRENCY"; break;
182 case VT_DATE: o << "DATE"; break;
183 case VT_BSTR: o << "string"; break;
184 case VT_DISPATCH: o << "IDispatch *"; break;
185 case VT_ERROR: o << "SCODE"; break;
186 case VT_BOOL: o << "bool"; break;
187 case VT_VARIANT: o << "VARIANT *"; break;
188 case VT_UNKNOWN: o << "IUnknown *"; break;
189 case VT_DECIMAL: o << "DECIMAL"; break;
190 case VT_I1: o << "char"; break;
191 case VT_UI1: o << "unsigned char"; break;
192 case VT_UI2: o << "unsigned short"; break;
193 case VT_UI4: o << "unsigned long"; break;
194 case VT_I8: o << "long long"; break;
195 case VT_UI8: o << "unsigned long long"; break;
196 case VT_INT: o << "int"; break;
197 case VT_UINT: o << "unsigned int"; break;
198 case VT_VOID: o << "void"; break;
199 case VT_HRESULT: o << "HRESULT"; break;
200 case VT_PTR: o << "void *"; break;
201 case VT_SAFEARRAY: o << "SAFEARRAY *"; break;
202 case VT_LPSTR: o << "LPSTR"; break;
203 case VT_LPWSTR: o << "LPWSTR"; break;
204 case VT_RECORD: o << "struct { }"; break;
205 case VT_INT_PTR: o << "intptr_t"; break;
206 case VT_UINT_PTR: o << "uintptr_t"; break;
207 case VT_FILETIME: o << "FILETIME"; break;
208 default: o << "???"; break;
209 }
210
211 if(var.vt & VT_ARRAY)
212 o << "[]";
213 else if(var.vt & VT_BYREF)
214 o << " *";
215 else
216 {
217 switch(var.vt & VT_TYPEMASK)
218 {
219 case VT_EMPTY:
220 case VT_NULL:
221 case VT_RECORD:
222 case VT_VOID:
223
224 // TODO
225 case VT_CY:
226 case VT_DATE:
227 case VT_DECIMAL:
228 case VT_FILETIME:
229 break;
230
231 default:
232 o << " = ";
233 }
234
235 switch(var.vt & VT_TYPEMASK)
236 {
237 case VT_I2: o << var.iVal; break;
238 case VT_I4: o << var.lVal; break;
239 case VT_R4: o << var.fltVal; break;
240 case VT_R8: o << var.dblVal; break;
241 case VT_BSTR: o << std::wstring(var.bstrVal, var.bstrVal + SysStringLen(var.bstrVal)); break;
242 case VT_BOOL: o << var.boolVal ? "true" : "false"; break;
243 case VT_I1: o << int(var.cVal); break;
244 case VT_UI1: o << unsigned int(var.bVal); break;
245 case VT_UI2: o << var.uiVal; break;
246 case VT_UI4: o << var.ulVal; break;
247 case VT_I8: o << var.llVal; break;
248 case VT_UI8: o << var.ullVal; break;
249 case VT_INT: o << var.intVal; break;
250 case VT_UINT: o << var.uintVal; break;
251 case VT_LPSTR: o << LPSTR(var.byref); break;
252 case VT_LPWSTR: o << LPWSTR(var.byref); break;
253 case VT_INT_PTR: o << var.intVal; break; // BUGBUG
254 case VT_UINT_PTR: o << var.uintVal; break; // BUGBUG
255
256 case VT_DISPATCH:
257 case VT_VARIANT:
258 case VT_UNKNOWN:
259 case VT_PTR:
260 case VT_SAFEARRAY:
261 case VT_RECORD:
262 o << var.byref; break;
263
264 case VT_ERROR:
265 case VT_HRESULT:
266 o << std::hex << var.ulVal; break;
267
268 case VT_EMPTY:
269 case VT_NULL:
270 case VT_VOID:
271 break;
272
273 default:
274 assert(0);
275 }
276 }
277
278 return o.str();
279 }
280
281#pragma warning(disable:4584)
282
287
289 {
290 private:
293
294 public:
296 m_refCount(1),
297 m_IConnectionPointContainer(pIConnectionPointContainer)
298 { }
299
300 ~CConnectionPointContainer() { m_IConnectionPointContainer->Release(); }
301
303 {
304 HRESULT hr = S_OK;
305
306 dbgprintf(TEXT("CConnectionPointContainer::QueryInterface(%ls, %p)"), UUIDToString(riid).c_str(), ppvObject);
307
309 *ppvObject = this;
310 else
311 {
312 *ppvObject = NULL;
314 }
315
316 dbgprintf(TEXT("CConnectionPointContainer::QueryInterface -> %08X, ppvObject = %p"), hr, *ppvObject);
317 return hr;
318 }
319
321 {
322 return InterlockedIncrement(&m_refCount);
323 }
324
326 {
327 LONG n = InterlockedDecrement(&m_refCount);
328
329 if(n == 0)
330 delete this;
331
332 return n;
333 }
334
336 {
337 dbgprintf(TEXT("CConnectionPointContainer::EnumConnectionPoints(%p)"), ppEnum);
338 HRESULT hr = m_IConnectionPointContainer->EnumConnectionPoints(ppEnum);
339 dbgprintf(TEXT("CConnectionPointContainer::EnumConnectionPoints -> %08X, pEnum = %p"), hr, *ppEnum);
340
341 if(SUCCEEDED(hr))
342 *ppEnum = HookIEnumConnectionPoints(*ppEnum);
343
344 return hr;
345 }
346
348 {
349 dbgprintf(TEXT("CConnectionPointContainer::FindConnectionPoint(%ls, %p)"), UUIDToString(riid).c_str(), ppCP);
350 HRESULT hr = m_IConnectionPointContainer->FindConnectionPoint(riid, ppCP);
351 dbgprintf(TEXT("CConnectionPointContainer::FindConnectionPoint -> %08X, pCP = %p"), hr, *ppCP);
352
353 if(SUCCEEDED(hr))
354 *ppCP = HookIConnectionPoint(*ppCP);
355
356 return hr;
357 }
358 };
359
361 {
362 private:
365
366 public:
368 m_refCount(1),
369 m_IEnumConnectionPoints(pIEnumConnectionPoints)
370 { }
371
372 ~CEnumConnectionPoints() { m_IEnumConnectionPoints->Release(); }
373
375 {
376 HRESULT hr = S_OK;
377
378 dbgprintf(TEXT("CEnumConnectionPoints::QueryInterface(%ls, %p)"), UUIDToString(riid).c_str(), ppvObject);
379
381 *ppvObject = this;
382 else
383 {
384 *ppvObject = NULL;
386 }
387
388 dbgprintf(TEXT("CEnumConnectionPoints::QueryInterface -> %08X, ppvObject = %p"), hr, *ppvObject);
389 return hr;
390 }
391
393 {
394 return InterlockedIncrement(&m_refCount);
395 }
396
398 {
399 LONG n = InterlockedDecrement(&m_refCount);
400
401 if(n == 0)
402 delete this;
403
404 return n;
405 }
406
407 virtual HRESULT STDMETHODCALLTYPE Next(ULONG cConnections, LPCONNECTIONPOINT * ppCP, ULONG * pcFetched)
408 {
409 dbgprintf(TEXT("CEnumConnectionPoints::Next(%lu, %p, %p)"), cConnections, ppCP, pcFetched);
410 HRESULT hr = m_IEnumConnectionPoints->Next(cConnections, ppCP, pcFetched);
411 dbgprintf(TEXT("CEnumConnectionPoints:: -> %08X, pCP = %p, cFetched = %lu"), hr, *ppCP, *pcFetched);
412
413 if(SUCCEEDED(hr))
414 *ppCP = HookIConnectionPoint(*ppCP);
415
416 return hr;
417 }
418
419 virtual HRESULT STDMETHODCALLTYPE Skip(ULONG cConnections)
420 {
421 dbgprintf(TEXT("CEnumConnectionPoints::Skip(%lu)"), cConnections);
422 HRESULT hr = m_IEnumConnectionPoints->Skip(cConnections);
423 dbgprintf(TEXT("CEnumConnectionPoints:: -> %08X"), hr);
424 return hr;
425 }
426
428 {
429 dbgprintf(TEXT("CEnumConnectionPoints::Reset()"));
430 HRESULT hr = m_IEnumConnectionPoints->Reset();
431 dbgprintf(TEXT("CEnumConnectionPoints:: -> %08X"), hr);
432 return hr;
433 }
434
436 {
437 dbgprintf(TEXT("CEnumConnectionPoints::Clone(%p)"), ppEnum);
438 HRESULT hr = m_IEnumConnectionPoints->Clone(ppEnum);
439 dbgprintf(TEXT("CEnumConnectionPoints:: -> %08X, pEnum"), hr, *ppEnum);
440
441 if(SUCCEEDED(hr))
442 *ppEnum = HookIEnumConnectionPoints(*ppEnum);
443
444 return hr;
445 }
446 };
447
449 {
450 private:
453
454 public:
455 CConnectionPoint(IConnectionPoint * pIConnectionPoint):
456 m_refCount(1),
457 m_IConnectionPoint(pIConnectionPoint)
458 { }
459
460 ~CConnectionPoint() { m_IConnectionPoint->Release(); }
461
463 {
464 HRESULT hr = S_OK;
465
466 dbgprintf(TEXT("CConnectionPoint::QueryInterface(%ls, %p)"), UUIDToString(riid).c_str(), ppvObject);
467
469 *ppvObject = this;
470 else
471 {
472 *ppvObject = NULL;
474 }
475
476 dbgprintf(TEXT("CConnectionPoint::QueryInterface -> %08X, ppvObject = %p"), hr, *ppvObject);
477 return hr;
478 }
479
481 {
482 return InterlockedIncrement(&m_refCount);
483 }
484
486 {
487 LONG n = InterlockedDecrement(&m_refCount);
488
489 if(n == 0)
490 delete this;
491
492 return n;
493 }
494
496 {
497 dbgprintf(TEXT("CConnectionPoint::GetConnectionInterface(%p)"), pIID);
498 HRESULT hr = m_IConnectionPoint->GetConnectionInterface(pIID);
499 dbgprintf(TEXT("CConnectionPoint::GetConnectionInterface -> %08X, IID = %ls"), hr, UUIDToString(*pIID).c_str());
500 return hr;
501 }
502
504 {
505 dbgprintf(TEXT("CConnectionPoint::GetConnectionPointContainer(%p)"), ppCPC);
506 HRESULT hr = m_IConnectionPoint->GetConnectionPointContainer(ppCPC);
507 dbgprintf(TEXT("CConnectionPoint::GetConnectionPointContainer -> %08X, pCPC = %p"), hr, *ppCPC);
508
509 if(SUCCEEDED(hr))
510 *ppCPC = HookIConnectionPointContainer(*ppCPC);
511
512 return hr;
513 }
514
515 virtual HRESULT STDMETHODCALLTYPE Advise(IUnknown * pUnkSink, DWORD * pdwCookie)
516 {
517 dbgprintf(TEXT("CConnectionPoint::Advise(%p, %p)"), pUnkSink, pdwCookie);
518 HRESULT hr = m_IConnectionPoint->Advise(pUnkSink, pdwCookie);
519 dbgprintf(TEXT("CConnectionPoint::Advise -> %08X, dwCookie = %lu"), hr, *pdwCookie);
520 // TODO: hook sink
521 return hr;
522 }
523
525 {
526 dbgprintf(TEXT("CConnectionPoint::Unadvise(%lu)"), dwCookie);
527 HRESULT hr = m_IConnectionPoint->Unadvise(dwCookie);
528 dbgprintf(TEXT("CConnectionPoint::Unadvise -> %08X"), hr);
529 return hr;
530 }
531
533 {
534 dbgprintf(TEXT("CConnectionPoint::EnumConnections(%p)"), ppEnum);
535 HRESULT hr = m_IConnectionPoint->EnumConnections(ppEnum);
536 dbgprintf(TEXT("CConnectionPoint::EnumConnections -> %08X, pEnum = %p"), hr, *ppEnum);
537
538 if(SUCCEEDED(hr))
539 *ppEnum = HookIEnumConnections(*ppEnum);
540
541 return hr;
542 }
543 };
544
546 {
547 private:
550
551 public:
552 CEnumConnections(IEnumConnections * pIEnumConnections):
553 m_refCount(1),
554 m_IEnumConnections(pIEnumConnections)
555 { }
556
557 ~CEnumConnections() { m_IEnumConnections->Release(); }
558
560 {
561 HRESULT hr = S_OK;
562
563 dbgprintf(TEXT("CEnumConnections::QueryInterface(%ls, %p)"), UUIDToString(riid).c_str(), ppvObject);
564
566 *ppvObject = this;
567 else
568 {
569 *ppvObject = NULL;
571 }
572
573 dbgprintf(TEXT("CEnumConnections::QueryInterface -> %08X, ppvObject = %p"), hr, *ppvObject);
574 return hr;
575 }
576
578 {
579 return InterlockedIncrement(&m_refCount);
580 }
581
583 {
584 LONG n = InterlockedDecrement(&m_refCount);
585
586 if(n == 0)
587 delete this;
588
589 return n;
590 }
591
592 virtual HRESULT STDMETHODCALLTYPE Next(ULONG cConnections, LPCONNECTDATA pCD, ULONG * pcFetched)
593 {
594 dbgprintf(TEXT("CEnumConnections::Next(%lu, %p, %p)"), cConnections, pCD, pcFetched);
595 HRESULT hr = m_IEnumConnections->Next(cConnections, pCD, pcFetched);
596 dbgprintf(TEXT("CEnumConnections:: -> %08X, CD = { pUnk = %p, dwCookie = %lu }, cFetched = %lu"), hr, pCD->pUnk, pCD->dwCookie, *pcFetched);
597 return hr;
598 }
599
600 virtual HRESULT STDMETHODCALLTYPE Skip(ULONG cConnections)
601 {
602 dbgprintf(TEXT("CEnumConnections::Skip(%lu)"), cConnections);
603 HRESULT hr = m_IEnumConnections->Skip(cConnections);
604 dbgprintf(TEXT("CEnumConnections:: -> %08X"), hr);
605 return hr;
606 }
607
609 {
610 dbgprintf(TEXT("CEnumConnections::Reset()"));
611 HRESULT hr = m_IEnumConnections->Reset();
612 dbgprintf(TEXT("CEnumConnections:: -> %08X"), hr);
613 return hr;
614 }
615
617 {
618 dbgprintf(TEXT("CEnumConnections::Clone(%p)"), ppEnum);
619 HRESULT hr = m_IEnumConnections->Clone(ppEnum);
620 dbgprintf(TEXT("CEnumConnections:: -> %08X, pEnum"), hr, *ppEnum);
621
622 if(SUCCEEDED(hr))
623 *ppEnum = HookIEnumConnections(*ppEnum);
624
625 return hr;
626 }
627 };
628
630 {
631 return new CConnectionPointContainer(p);
632 }
633
635 {
636 return new CEnumConnectionPoints(p);
637 }
638
640 {
641 return new CConnectionPoint(p);
642 }
643
645 {
646 return new CEnumConnections(p);
647 }
648
650 {
651 private:
660
662 {
663 assert(m_IDispatch);
664 return m_IDispatch;
665 }
666
668 {
669 if(m_IMsTscAdvancedSettings)
670 return m_IMsTscAdvancedSettings;
671 else if(m_IMsRdpClientAdvancedSettings)
672 m_IMsTscAdvancedSettings = m_IMsRdpClientAdvancedSettings;
673 else if(m_IMsRdpClientAdvancedSettings2)
674 m_IMsTscAdvancedSettings = m_IMsRdpClientAdvancedSettings2;
675 else if(m_IMsRdpClientAdvancedSettings3)
676 m_IMsTscAdvancedSettings = m_IMsRdpClientAdvancedSettings3;
677 else if(m_IMsRdpClientAdvancedSettings4)
678 m_IMsTscAdvancedSettings = m_IMsRdpClientAdvancedSettings4;
679
680 if(m_IMsTscAdvancedSettings)
681 {
682 m_IMsTscAdvancedSettings->AddRef();
683 return m_IMsTscAdvancedSettings;
684 }
685
686 m_IUnknown->QueryInterface(&m_IMsTscAdvancedSettings);
687 return m_IMsTscAdvancedSettings;
688 }
689
691 {
692 if(m_IMsRdpClientAdvancedSettings)
693 return m_IMsRdpClientAdvancedSettings;
694 else if(m_IMsRdpClientAdvancedSettings2)
695 m_IMsRdpClientAdvancedSettings = m_IMsRdpClientAdvancedSettings2;
696 else if(m_IMsRdpClientAdvancedSettings3)
697 m_IMsRdpClientAdvancedSettings = m_IMsRdpClientAdvancedSettings3;
698 else if(m_IMsRdpClientAdvancedSettings4)
699 m_IMsRdpClientAdvancedSettings = m_IMsRdpClientAdvancedSettings4;
700
701 if(m_IMsRdpClientAdvancedSettings)
702 {
703 m_IMsRdpClientAdvancedSettings->AddRef();
704 return m_IMsRdpClientAdvancedSettings;
705 }
706
707 m_IUnknown->QueryInterface(&m_IMsRdpClientAdvancedSettings);
708 return m_IMsRdpClientAdvancedSettings;
709 }
710
712 {
713 if(m_IMsRdpClientAdvancedSettings2)
714 return m_IMsRdpClientAdvancedSettings2;
715 else if(m_IMsRdpClientAdvancedSettings3)
716 m_IMsRdpClientAdvancedSettings2 = m_IMsRdpClientAdvancedSettings3;
717 else if(m_IMsRdpClientAdvancedSettings4)
718 m_IMsRdpClientAdvancedSettings2 = m_IMsRdpClientAdvancedSettings4;
719
720 if(m_IMsRdpClientAdvancedSettings2)
721 {
722 m_IMsRdpClientAdvancedSettings2->AddRef();
723 return m_IMsRdpClientAdvancedSettings2;
724 }
725
726 m_IUnknown->QueryInterface(&m_IMsRdpClientAdvancedSettings2);
727 return m_IMsRdpClientAdvancedSettings2;
728 }
729
731 {
732 if(m_IMsRdpClientAdvancedSettings3)
733 return m_IMsRdpClientAdvancedSettings3;
734 else if(m_IMsRdpClientAdvancedSettings4)
735 m_IMsRdpClientAdvancedSettings3 = m_IMsRdpClientAdvancedSettings4;
736
737 if(m_IMsRdpClientAdvancedSettings3)
738 {
739 m_IMsRdpClientAdvancedSettings3->AddRef();
740 return m_IMsRdpClientAdvancedSettings3;
741 }
742
743 m_IUnknown->QueryInterface(&m_IMsRdpClientAdvancedSettings3);
744 return m_IMsRdpClientAdvancedSettings3;
745 }
746
748 {
749 if(m_IMsRdpClientAdvancedSettings4)
750 return m_IMsRdpClientAdvancedSettings4;
751
752 if(m_IMsRdpClientAdvancedSettings4)
753 {
754 m_IMsRdpClientAdvancedSettings4->AddRef();
755 return m_IMsRdpClientAdvancedSettings4;
756 }
757
758 m_IUnknown->QueryInterface(&m_IMsRdpClientAdvancedSettings4);
759 return m_IMsRdpClientAdvancedSettings4;
760 }
761
763 {
764 m_IUnknown->Release();
765 m_IDispatch->Release();
766
767 if(m_IMsTscAdvancedSettings)
768 m_IMsTscAdvancedSettings->Release();
769
770 if(m_IMsRdpClientAdvancedSettings)
771 m_IMsRdpClientAdvancedSettings->Release();
772
773 if(m_IMsRdpClientAdvancedSettings2)
774 m_IMsRdpClientAdvancedSettings2->Release();
775
776 if(m_IMsRdpClientAdvancedSettings3)
777 m_IMsRdpClientAdvancedSettings3->Release();
778
779 if(m_IMsRdpClientAdvancedSettings4)
780 m_IMsRdpClientAdvancedSettings4->Release();
781 }
782
784 {
785 m_IMsTscAdvancedSettings = p;
786 }
787
789 {
790 m_IMsRdpClientAdvancedSettings = p;
791 }
792
794 {
795 m_IMsRdpClientAdvancedSettings2 = p;
796 }
797
799 {
800 m_IMsRdpClientAdvancedSettings3 = p;
801 }
802
804 {
805 m_IMsRdpClientAdvancedSettings4 = p;
806 }
807
808 public:
809 template<class Interface> CAdvancedSettings(Interface * p):
810 m_refCount(1),
811 m_IUnknown(p),
812 m_IDispatch(p),
813 m_IMsTscAdvancedSettings(NULL),
814 m_IMsRdpClientAdvancedSettings(NULL),
815 m_IMsRdpClientAdvancedSettings2(NULL),
816 m_IMsRdpClientAdvancedSettings3(NULL),
817 m_IMsRdpClientAdvancedSettings4(NULL)
818 {
819 assert(p);
820 p->AddRef();
821 p->AddRef();
822 Init(p);
823 }
824
825 /* IUnknown */
827 {
828 HRESULT hr;
829 IUnknown * pvObject;
830
831 dbgprintf(TEXT("CAdvancedSettings::QueryInterface(%ls, %p)"), UUIDToString(riid).c_str(), ppvObject);
832
833#define QIBEGIN() \
834 if(riid == IID_IUnknown) \
835 { \
836 hr = S_OK; \
837 pvObject = (IUnknown *)(this); \
838 }
839
840#define QI(I) \
841 else if(riid == IID_ ## I) \
842 { \
843 if(m_ ## I) \
844 { \
845 m_ ## I->AddRef(); \
846 hr = S_OK; \
847 } \
848 else \
849 { \
850 hr = m_IUnknown->QueryInterface(&m_ ## I); \
851 } \
852 \
853 if(SUCCEEDED(hr)) \
854 pvObject = static_cast<I *>(this); \
855 }
856
857#define QIEND() \
858 else \
859 { \
860 hr = E_NOINTERFACE; \
861 pvObject = NULL; \
862 }
863
864 QIBEGIN()
871 QIEND()
872
873#undef QIBEGIN
874#undef QIEND
875#undef QI
876
877 if(SUCCEEDED(hr))
878 {
879 assert(pvObject);
880 pvObject->AddRef();
881 }
882 else
883 {
884 assert(pvObject == NULL);
885 }
886
887 *ppvObject = pvObject;
888
889 dbgprintf(TEXT("CAdvancedSettings::QueryInterface -> %08X, ppvObject = %p"), hr, *ppvObject);
890 return hr;
891 }
892
894 {
895 return InterlockedIncrement(&m_refCount);
896 }
897
899 {
900 LONG n = InterlockedDecrement(&m_refCount);
901
902 if(n == 0)
903 delete this;
904
905 return n;
906 }
907
908 /* IDispatch */
909 /*
910 * p = get();
911 dbgprintf(TEXT("CAdvancedSettings::()"), );
912 HRESULT hr = p->();
913 dbgprintf(TEXT("CAdvancedSettings:: -> %08X, "), hr, );
914 return hr;
915 */
917 {
918 IDispatch * pIDispatch = getIDispatch();
919 dbgprintf(TEXT("CAdvancedSettings::GetTypeInfoCount(%p)"), pctinfo);
920 HRESULT hr = pIDispatch->GetTypeInfoCount(pctinfo);
921 dbgprintf(TEXT("CAdvancedSettings::GetTypeInfoCount -> %08X, ctinfo = %u"), hr, *pctinfo);
922 return hr;
923 }
924
925 virtual STDMETHODIMP IDispatch::GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo ** ppTInfo)
926 {
927 IDispatch * pIDispatch = getIDispatch();
928 dbgprintf(TEXT("CAdvancedSettings::GetTypeInfo(%u, %lu, %p)"), iTInfo, lcid, ppTInfo);
929 HRESULT hr = pIDispatch->GetTypeInfo(iTInfo, lcid, ppTInfo);
930 dbgprintf(TEXT("CAdvancedSettings::GetTypeInfo -> %08X, pTInfo = %p"), hr, *ppTInfo);
931 return hr;
932 }
933
934 virtual STDMETHODIMP IDispatch::GetIDsOfNames(REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId)
935 {
936 IDispatch * pIDispatch = getIDispatch();
937 dbgprintf(TEXT("CAdvancedSettings::GetIDsOfNames(%ls, %ls, %d, %lu, %p)"), UUIDToString(riid).c_str(), *rgszNames, cNames, lcid, rgDispId);
938 HRESULT hr = pIDispatch->GetIDsOfNames(riid, rgszNames, cNames, lcid, rgDispId);
939 dbgprintf(TEXT("CAdvancedSettings::GetIDsOfNames -> %08X, rgDispId = %ld"), hr, *rgDispId);
940 return hr;
941 }
942
943 virtual STDMETHODIMP IDispatch::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult, EXCEPINFO * pExcepInfo, UINT * puArgErr)
944 {
945 // TODO
946 IDispatch * pIDispatch = getIDispatch();
947 dbgprintf(TEXT("CAdvancedSettings::Invoke()")/*, */);
948 HRESULT hr = pIDispatch->Invoke(dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
949 dbgprintf(TEXT("CAdvancedSettings::Invoke -> %08X, "), hr/*, */);
950 return hr;
951 }
952
953 /* IMsTscAdvancedSettings */
954 virtual STDMETHODIMP IMsTscAdvancedSettings::put_Compress(long pcompress)
955 {
956 IMsTscAdvancedSettings * pIMsTscAdvancedSettings = getIMsTscAdvancedSettings();
957 dbgprintf(TEXT("CAdvancedSettings::put_Compress(%ld)"), pcompress);
958 HRESULT hr = pIMsTscAdvancedSettings->put_Compress(pcompress);
959 dbgprintf(TEXT("CAdvancedSettings::put_Compress -> %08X"), hr);
960 return hr;
961 }
962
963 virtual STDMETHODIMP IMsTscAdvancedSettings::get_Compress(long * pcompress)
964 {
965 IMsTscAdvancedSettings * pIMsTscAdvancedSettings = getIMsTscAdvancedSettings();
966 dbgprintf(TEXT("CAdvancedSettings::get_Compress(%p)"), pcompress);
967 HRESULT hr = pIMsTscAdvancedSettings->get_Compress(pcompress);
968 dbgprintf(TEXT("CAdvancedSettings::get_Compress -> %08X, compress = %ld"), hr, *pcompress);
969 return hr;
970 }
971
972 virtual STDMETHODIMP IMsTscAdvancedSettings::put_BitmapPeristence(long pbitmapPeristence)
973 {
974 IMsTscAdvancedSettings * pIMsTscAdvancedSettings = getIMsTscAdvancedSettings();
975 dbgprintf(TEXT("CAdvancedSettings::put_BitmapPeristence(%ld)"), pbitmapPeristence);
976 HRESULT hr = pIMsTscAdvancedSettings->put_BitmapPeristence(pbitmapPeristence);
977 dbgprintf(TEXT("CAdvancedSettings::put_BitmapPeristence -> %08X"), hr);
978 return hr;
979 }
980
981 virtual STDMETHODIMP IMsTscAdvancedSettings::get_BitmapPeristence(long * pbitmapPeristence)
982 {
983 IMsTscAdvancedSettings * pIMsTscAdvancedSettings = getIMsTscAdvancedSettings();
984 dbgprintf(TEXT("CAdvancedSettings::get_BitmapPeristence(%p)"), pbitmapPeristence);
985 HRESULT hr = pIMsTscAdvancedSettings->get_BitmapPeristence(pbitmapPeristence);
986 dbgprintf(TEXT("CAdvancedSettings::get_BitmapPeristence -> %08X, bitmapPeristence = %ld"), hr, *pbitmapPeristence);
987 return hr;
988 }
989
990 virtual STDMETHODIMP IMsTscAdvancedSettings::put_allowBackgroundInput(long pallowBackgroundInput)
991 {
992 IMsTscAdvancedSettings * pIMsTscAdvancedSettings = getIMsTscAdvancedSettings();
993 dbgprintf(TEXT("CAdvancedSettings::put_allowBackgroundInput(%ld)"), pallowBackgroundInput);
994 HRESULT hr = pIMsTscAdvancedSettings->put_allowBackgroundInput(pallowBackgroundInput);
995 dbgprintf(TEXT("CAdvancedSettings::put_allowBackgroundInput -> %08X"), hr);
996 return hr;
997 }
998
999 virtual STDMETHODIMP IMsTscAdvancedSettings::get_allowBackgroundInput(long * pallowBackgroundInput)
1000 {
1001 IMsTscAdvancedSettings * pIMsTscAdvancedSettings = getIMsTscAdvancedSettings();
1002 dbgprintf(TEXT("CAdvancedSettings::get_allowBackgroundInput(%p)"), pallowBackgroundInput);
1003 HRESULT hr = pIMsTscAdvancedSettings->get_allowBackgroundInput(pallowBackgroundInput);
1004 dbgprintf(TEXT("CAdvancedSettings::get_allowBackgroundInput -> %08X, allowBackgroundInput = %ld"), hr, *pallowBackgroundInput);
1005 return hr;
1006 }
1007
1008 virtual STDMETHODIMP IMsTscAdvancedSettings::put_KeyBoardLayoutStr(BSTR rhs)
1009 {
1010 IMsTscAdvancedSettings * pIMsTscAdvancedSettings = getIMsTscAdvancedSettings();
1011 dbgprintf(TEXT("CAdvancedSettings::put_KeyBoardLayoutStr(%ls)"), rhs);
1012 HRESULT hr = pIMsTscAdvancedSettings->put_KeyBoardLayoutStr(rhs);
1013 dbgprintf(TEXT("CAdvancedSettings::put_KeyBoardLayoutStr -> %08X"), hr);
1014 return hr;
1015 }
1016
1017 virtual STDMETHODIMP IMsTscAdvancedSettings::put_PluginDlls(BSTR rhs)
1018 {
1019 IMsTscAdvancedSettings * pIMsTscAdvancedSettings = getIMsTscAdvancedSettings();
1020 dbgprintf(TEXT("CAdvancedSettings::put_PluginDlls(%ls)"), rhs);
1021 HRESULT hr = pIMsTscAdvancedSettings->put_PluginDlls(rhs);
1022 dbgprintf(TEXT("CAdvancedSettings::put_PluginDlls -> %08X"), hr);
1023 return hr;
1024 }
1025
1026 virtual STDMETHODIMP IMsTscAdvancedSettings::put_IconFile(BSTR rhs)
1027 {
1028 IMsTscAdvancedSettings * pIMsTscAdvancedSettings = getIMsTscAdvancedSettings();
1029 dbgprintf(TEXT("CAdvancedSettings::put_IconFile(%ls)"), rhs);
1030 HRESULT hr = pIMsTscAdvancedSettings->put_IconFile(rhs);
1031 dbgprintf(TEXT("CAdvancedSettings::put_IconFile -> %08X"), hr);
1032 return hr;
1033 }
1034
1035 virtual STDMETHODIMP IMsTscAdvancedSettings::put_IconIndex(long rhs)
1036 {
1037 IMsTscAdvancedSettings * pIMsTscAdvancedSettings = getIMsTscAdvancedSettings();
1038 dbgprintf(TEXT("CAdvancedSettings::put_IconIndex(%ld)"), rhs);
1039 HRESULT hr = pIMsTscAdvancedSettings->put_IconIndex(rhs);
1040 dbgprintf(TEXT("CAdvancedSettings::put_IconIndex -> %08X"), hr);
1041 return hr;
1042 }
1043
1044 virtual STDMETHODIMP IMsTscAdvancedSettings::put_ContainerHandledFullScreen(long pContainerHandledFullScreen)
1045 {
1046 IMsTscAdvancedSettings * pIMsTscAdvancedSettings = getIMsTscAdvancedSettings();
1047 dbgprintf(TEXT("CAdvancedSettings::put_ContainerHandledFullScreen(%ld)"), pContainerHandledFullScreen);
1048 HRESULT hr = pIMsTscAdvancedSettings->put_ContainerHandledFullScreen(pContainerHandledFullScreen);
1049 dbgprintf(TEXT("CAdvancedSettings::put_ContainerHandledFullScreen -> %08X"), hr);
1050 return hr;
1051 }
1052
1053 virtual STDMETHODIMP IMsTscAdvancedSettings::get_ContainerHandledFullScreen(long * pContainerHandledFullScreen)
1054 {
1055 IMsTscAdvancedSettings * pIMsTscAdvancedSettings = getIMsTscAdvancedSettings();
1056 dbgprintf(TEXT("CAdvancedSettings::get_ContainerHandledFullScreen(%p)"), pContainerHandledFullScreen);
1057 HRESULT hr = pIMsTscAdvancedSettings->get_ContainerHandledFullScreen(pContainerHandledFullScreen);
1058 dbgprintf(TEXT("CAdvancedSettings::get_ContainerHandledFullScreen -> %08X, ContainerHandledFullScreen = %ld"), hr, *pContainerHandledFullScreen);
1059 return hr;
1060 }
1061
1062 virtual STDMETHODIMP IMsTscAdvancedSettings::put_DisableRdpdr(long pDisableRdpdr)
1063 {
1064 IMsTscAdvancedSettings * pIMsTscAdvancedSettings = getIMsTscAdvancedSettings();
1065 dbgprintf(TEXT("CAdvancedSettings::put_DisableRdpdr(%ld)"), pDisableRdpdr);
1066 HRESULT hr = pIMsTscAdvancedSettings->put_DisableRdpdr(pDisableRdpdr);
1067 dbgprintf(TEXT("CAdvancedSettings::put_DisableRdpdr -> %08X"), hr);
1068 return hr;
1069 }
1070
1071 virtual STDMETHODIMP IMsTscAdvancedSettings::get_DisableRdpdr(long * pDisableRdpdr)
1072 {
1073 IMsTscAdvancedSettings * pIMsTscAdvancedSettings = getIMsTscAdvancedSettings();
1074 dbgprintf(TEXT("CAdvancedSettings::get_DisableRdpdr(%p)"), pDisableRdpdr);
1075 HRESULT hr = pIMsTscAdvancedSettings->get_DisableRdpdr(pDisableRdpdr);
1076 dbgprintf(TEXT("CAdvancedSettings::get_DisableRdpdr -> %08X, DisableRdpdr = %ld"), hr, *pDisableRdpdr);
1077 return hr;
1078 }
1079
1080 /* IMsRdpClientAdvancedSettings */
1081 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_SmoothScroll(long psmoothScroll)
1082 {
1083 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1084 dbgprintf(TEXT("CAdvancedSettings::put_SmoothScroll(%ld)"), psmoothScroll);
1085 HRESULT hr = pIMsRdpClientAdvancedSettings->put_SmoothScroll(psmoothScroll);
1086 dbgprintf(TEXT("CAdvancedSettings::put_SmoothScroll -> %08X"), hr);
1087 return hr;
1088 }
1089
1090 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_SmoothScroll(long * psmoothScroll)
1091 {
1092 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1093 dbgprintf(TEXT("CAdvancedSettings::get_SmoothScroll(%p)"), psmoothScroll);
1094 HRESULT hr = pIMsRdpClientAdvancedSettings->get_SmoothScroll(psmoothScroll);
1095 dbgprintf(TEXT("CAdvancedSettings::get_SmoothScroll -> %08X, smoothScroll = %ld"), hr, *psmoothScroll);
1096 return hr;
1097 }
1098
1099 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_AcceleratorPassthrough(long pacceleratorPassthrough)
1100 {
1101 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1102 dbgprintf(TEXT("CAdvancedSettings::put_AcceleratorPassthrough(%ld)"), pacceleratorPassthrough);
1103 HRESULT hr = pIMsRdpClientAdvancedSettings->put_AcceleratorPassthrough(pacceleratorPassthrough);
1104 dbgprintf(TEXT("CAdvancedSettings::put_AcceleratorPassthrough -> %08X"), hr);
1105 return hr;
1106 }
1107
1108 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_AcceleratorPassthrough(long * pacceleratorPassthrough)
1109 {
1110 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1111 dbgprintf(TEXT("CAdvancedSettings::get_AcceleratorPassthrough(%p)"), pacceleratorPassthrough);
1112 HRESULT hr = pIMsRdpClientAdvancedSettings->get_AcceleratorPassthrough(pacceleratorPassthrough);
1113 dbgprintf(TEXT("CAdvancedSettings::get_AcceleratorPassthrough -> %08X, acceleratorPassthrough = %ld"), hr, *pacceleratorPassthrough);
1114 return hr;
1115 }
1116
1117 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_ShadowBitmap(long pshadowBitmap)
1118 {
1119 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1120 dbgprintf(TEXT("CAdvancedSettings::put_ShadowBitmap(%ld)"), pshadowBitmap);
1121 HRESULT hr = pIMsRdpClientAdvancedSettings->put_ShadowBitmap(pshadowBitmap);
1122 dbgprintf(TEXT("CAdvancedSettings::put_ShadowBitmap -> %08X"), hr);
1123 return hr;
1124 }
1125
1126 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_ShadowBitmap(long * pshadowBitmap)
1127 {
1128 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1129 dbgprintf(TEXT("CAdvancedSettings::get_ShadowBitmap(%p)"), pshadowBitmap);
1130 HRESULT hr = pIMsRdpClientAdvancedSettings->get_ShadowBitmap(pshadowBitmap);
1131 dbgprintf(TEXT("CAdvancedSettings::get_ShadowBitmap -> %08X, shadowBitmap = %ld"), hr, *pshadowBitmap);
1132 return hr;
1133 }
1134
1135 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_TransportType(long ptransportType)
1136 {
1137 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1138 dbgprintf(TEXT("CAdvancedSettings::put_TransportType(%ld)"), ptransportType);
1139 HRESULT hr = pIMsRdpClientAdvancedSettings->put_TransportType(ptransportType);
1140 dbgprintf(TEXT("CAdvancedSettings::put_TransportType -> %08X"), hr);
1141 return hr;
1142 }
1143
1144 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_TransportType(long * ptransportType)
1145 {
1146 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1147 dbgprintf(TEXT("CAdvancedSettings::get_TransportType(%p)"), ptransportType);
1148 HRESULT hr = pIMsRdpClientAdvancedSettings->get_TransportType(ptransportType);
1149 dbgprintf(TEXT("CAdvancedSettings::get_TransportType -> %08X, transportType = %ld"), hr, *ptransportType);
1150 return hr;
1151 }
1152
1153 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_SasSequence(long psasSequence)
1154 {
1155 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1156 dbgprintf(TEXT("CAdvancedSettings::put_SasSequence(%ld)"), psasSequence);
1157 HRESULT hr = pIMsRdpClientAdvancedSettings->put_SasSequence(psasSequence);
1158 dbgprintf(TEXT("CAdvancedSettings::put_SasSequence -> %08X"), hr);
1159 return hr;
1160 }
1161
1162 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_SasSequence(long * psasSequence)
1163 {
1164 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1165 dbgprintf(TEXT("CAdvancedSettings::get_SasSequence(%p)"), psasSequence);
1166 HRESULT hr = pIMsRdpClientAdvancedSettings->get_SasSequence(psasSequence);
1167 dbgprintf(TEXT("CAdvancedSettings::get_SasSequence -> %08X, sasSequence = %ld"), hr, *psasSequence);
1168 return hr;
1169 }
1170
1171 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_EncryptionEnabled(long pencryptionEnabled)
1172 {
1173 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1174 dbgprintf(TEXT("CAdvancedSettings::put_EncryptionEnabled(%ld)"), pencryptionEnabled);
1175 HRESULT hr = pIMsRdpClientAdvancedSettings->put_EncryptionEnabled(pencryptionEnabled);
1176 dbgprintf(TEXT("CAdvancedSettings::put_EncryptionEnabled -> %08X"), hr);
1177 return hr;
1178 }
1179
1180 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_EncryptionEnabled(long * pencryptionEnabled)
1181 {
1182 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1183 dbgprintf(TEXT("CAdvancedSettings::get_EncryptionEnabled(%p)"), pencryptionEnabled);
1184 HRESULT hr = pIMsRdpClientAdvancedSettings->get_EncryptionEnabled(pencryptionEnabled);
1185 dbgprintf(TEXT("CAdvancedSettings::get_EncryptionEnabled -> %08X, encryptionEnabled = %ld"), hr, *pencryptionEnabled);
1186 return hr;
1187 }
1188
1189 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_DedicatedTerminal(long pdedicatedTerminal)
1190 {
1191 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1192 dbgprintf(TEXT("CAdvancedSettings::put_DedicatedTerminal(%ld)"), pdedicatedTerminal);
1193 HRESULT hr = pIMsRdpClientAdvancedSettings->put_DedicatedTerminal(pdedicatedTerminal);
1194 dbgprintf(TEXT("CAdvancedSettings::put_DedicatedTerminal -> %08X"), hr);
1195 return hr;
1196 }
1197
1198 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_DedicatedTerminal(long * pdedicatedTerminal)
1199 {
1200 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1201 dbgprintf(TEXT("CAdvancedSettings::get_DedicatedTerminal(%p)"), pdedicatedTerminal);
1202 HRESULT hr = pIMsRdpClientAdvancedSettings->get_DedicatedTerminal(pdedicatedTerminal);
1203 dbgprintf(TEXT("CAdvancedSettings::get_DedicatedTerminal -> %08X, dedicatedTerminal = %ld"), hr, *pdedicatedTerminal);
1204 return hr;
1205 }
1206
1207 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_RDPPort(long prdpPort)
1208 {
1209 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1210 dbgprintf(TEXT("CAdvancedSettings::put_RDPPort(%ld)"), prdpPort);
1211 HRESULT hr = pIMsRdpClientAdvancedSettings->put_RDPPort(prdpPort);
1212 dbgprintf(TEXT("CAdvancedSettings::put_RDPPort -> %08X"), hr);
1213 return hr;
1214 }
1215
1216 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RDPPort(long * prdpPort)
1217 {
1218 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1219 dbgprintf(TEXT("CAdvancedSettings::get_RDPPort(%p)"), prdpPort);
1220 HRESULT hr = pIMsRdpClientAdvancedSettings->get_RDPPort(prdpPort);
1221 dbgprintf(TEXT("CAdvancedSettings::get_RDPPort -> %08X, rdpPort = %ld"), hr, *prdpPort);
1222 return hr;
1223 }
1224
1225 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_EnableMouse(long penableMouse)
1226 {
1227 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1228 dbgprintf(TEXT("CAdvancedSettings::put_EnableMouse(%ld)"), penableMouse);
1229 HRESULT hr = pIMsRdpClientAdvancedSettings->put_EnableMouse(penableMouse);
1230 dbgprintf(TEXT("CAdvancedSettings::put_EnableMouse -> %08X"), hr);
1231 return hr;
1232 }
1233
1234 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_EnableMouse(long * penableMouse)
1235 {
1236 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1237 dbgprintf(TEXT("CAdvancedSettings::get_EnableMouse(%p)"), penableMouse);
1238 HRESULT hr = pIMsRdpClientAdvancedSettings->get_EnableMouse(penableMouse);
1239 dbgprintf(TEXT("CAdvancedSettings::get_EnableMouse -> %08X, enableMouse = %ld"), hr, *penableMouse);
1240 return hr;
1241 }
1242
1243 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_DisableCtrlAltDel(long pdisableCtrlAltDel)
1244 {
1245 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1246 dbgprintf(TEXT("CAdvancedSettings::put_DisableCtrlAltDel(%ld)"), pdisableCtrlAltDel);
1247 HRESULT hr = pIMsRdpClientAdvancedSettings->put_DisableCtrlAltDel(pdisableCtrlAltDel);
1248 dbgprintf(TEXT("CAdvancedSettings::put_DisableCtrlAltDel -> %08X"), hr);
1249 return hr;
1250 }
1251
1252 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_DisableCtrlAltDel(long * pdisableCtrlAltDel)
1253 {
1254 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1255 dbgprintf(TEXT("CAdvancedSettings::get_DisableCtrlAltDel(%p)"), pdisableCtrlAltDel);
1256 HRESULT hr = pIMsRdpClientAdvancedSettings->get_DisableCtrlAltDel(pdisableCtrlAltDel);
1257 dbgprintf(TEXT("CAdvancedSettings::get_DisableCtrlAltDel -> %08X, disableCtrlAltDel = %ld"), hr, *pdisableCtrlAltDel);
1258 return hr;
1259 }
1260
1261 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_EnableWindowsKey(long penableWindowsKey)
1262 {
1263 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1264 dbgprintf(TEXT("CAdvancedSettings::put_EnableWindowsKey(%ld)"), penableWindowsKey);
1265 HRESULT hr = pIMsRdpClientAdvancedSettings->put_EnableWindowsKey(penableWindowsKey);
1266 dbgprintf(TEXT("CAdvancedSettings::put_EnableWindowsKey -> %08X"), hr);
1267 return hr;
1268 }
1269
1270 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_EnableWindowsKey(long * penableWindowsKey)
1271 {
1272 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1273 dbgprintf(TEXT("CAdvancedSettings::get_EnableWindowsKey(%p)"), penableWindowsKey);
1274 HRESULT hr = pIMsRdpClientAdvancedSettings->get_EnableWindowsKey(penableWindowsKey);
1275 dbgprintf(TEXT("CAdvancedSettings::get_EnableWindowsKey -> %08X, enableWindowsKey = %ld"), hr, *penableWindowsKey);
1276 return hr;
1277 }
1278
1279 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_DoubleClickDetect(long pdoubleClickDetect)
1280 {
1281 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1282 dbgprintf(TEXT("CAdvancedSettings::put_DoubleClickDetect(%ld)"), pdoubleClickDetect);
1283 HRESULT hr = pIMsRdpClientAdvancedSettings->put_DoubleClickDetect(pdoubleClickDetect);
1284 dbgprintf(TEXT("CAdvancedSettings::put_DoubleClickDetect -> %08X"), hr);
1285 return hr;
1286 }
1287
1288 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_DoubleClickDetect(long * pdoubleClickDetect)
1289 {
1290 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1291 dbgprintf(TEXT("CAdvancedSettings::get_DoubleClickDetect(%p)"), pdoubleClickDetect);
1292 HRESULT hr = pIMsRdpClientAdvancedSettings->get_DoubleClickDetect(pdoubleClickDetect);
1293 dbgprintf(TEXT("CAdvancedSettings::get_DoubleClickDetect -> %08X, doubleClickDetect = %ld"), hr, *pdoubleClickDetect);
1294 return hr;
1295 }
1296
1297 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_MaximizeShell(long pmaximizeShell)
1298 {
1299 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1300 dbgprintf(TEXT("CAdvancedSettings::put_MaximizeShell(%ld)"), pmaximizeShell);
1301 HRESULT hr = pIMsRdpClientAdvancedSettings->put_MaximizeShell(pmaximizeShell);
1302 dbgprintf(TEXT("CAdvancedSettings::put_MaximizeShell -> %08X"), hr);
1303 return hr;
1304 }
1305
1306 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_MaximizeShell(long * pmaximizeShell)
1307 {
1308 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1309 dbgprintf(TEXT("CAdvancedSettings::get_MaximizeShell(%p)"), pmaximizeShell);
1310 HRESULT hr = pIMsRdpClientAdvancedSettings->get_MaximizeShell(pmaximizeShell);
1311 dbgprintf(TEXT("CAdvancedSettings::get_MaximizeShell -> %08X, maximizeShell = %ld"), hr, *pmaximizeShell);
1312 return hr;
1313 }
1314
1315 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_HotKeyFullScreen(long photKeyFullScreen)
1316 {
1317 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1318 dbgprintf(TEXT("CAdvancedSettings::put_HotKeyFullScreen(%ld)"), photKeyFullScreen);
1319 HRESULT hr = pIMsRdpClientAdvancedSettings->put_HotKeyFullScreen(photKeyFullScreen);
1320 dbgprintf(TEXT("CAdvancedSettings::put_HotKeyFullScreen -> %08X"), hr);
1321 return hr;
1322 }
1323
1324 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyFullScreen(long * photKeyFullScreen)
1325 {
1326 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1327 dbgprintf(TEXT("CAdvancedSettings::get_HotKeyFullScreen(%p)"), photKeyFullScreen);
1328 HRESULT hr = pIMsRdpClientAdvancedSettings->get_HotKeyFullScreen(photKeyFullScreen);
1329 dbgprintf(TEXT("CAdvancedSettings::get_HotKeyFullScreen -> %08X, hotKeyFullScreen = %ld"), hr, *photKeyFullScreen);
1330 return hr;
1331 }
1332
1333 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_HotKeyCtrlEsc(long photKeyCtrlEsc)
1334 {
1335 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1336 dbgprintf(TEXT("CAdvancedSettings::put_HotKeyCtrlEsc(%ld)"), photKeyCtrlEsc);
1337 HRESULT hr = pIMsRdpClientAdvancedSettings->put_HotKeyCtrlEsc(photKeyCtrlEsc);
1338 dbgprintf(TEXT("CAdvancedSettings::put_HotKeyCtrlEsc -> %08X"), hr);
1339 return hr;
1340 }
1341
1342 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyCtrlEsc(long * photKeyCtrlEsc)
1343 {
1344 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1345 dbgprintf(TEXT("CAdvancedSettings::get_HotKeyCtrlEsc(%p)"), photKeyCtrlEsc);
1346 HRESULT hr = pIMsRdpClientAdvancedSettings->get_HotKeyCtrlEsc(photKeyCtrlEsc);
1347 dbgprintf(TEXT("CAdvancedSettings::get_HotKeyCtrlEsc -> %08X, hotKeyCtrlEsc = %ld"), hr, *photKeyCtrlEsc);
1348 return hr;
1349 }
1350
1351 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_HotKeyAltEsc(long photKeyAltEsc)
1352 {
1353 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1354 dbgprintf(TEXT("CAdvancedSettings::put_HotKeyAltEsc(%ld)"), photKeyAltEsc);
1355 HRESULT hr = pIMsRdpClientAdvancedSettings->put_HotKeyAltEsc(photKeyAltEsc);
1356 dbgprintf(TEXT("CAdvancedSettings::put_HotKeyAltEsc -> %08X"), hr);
1357 return hr;
1358 }
1359
1360 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyAltEsc(long * photKeyAltEsc)
1361 {
1362 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1363 dbgprintf(TEXT("CAdvancedSettings::get_HotKeyAltEsc(%p)"), photKeyAltEsc);
1364 HRESULT hr = pIMsRdpClientAdvancedSettings->get_HotKeyAltEsc(photKeyAltEsc);
1365 dbgprintf(TEXT("CAdvancedSettings::get_HotKeyAltEsc -> %08X, hotKeyAltEsc = %ld"), hr, *photKeyAltEsc);
1366 return hr;
1367 }
1368
1369 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_HotKeyAltTab(long photKeyAltTab)
1370 {
1371 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1372 dbgprintf(TEXT("CAdvancedSettings::put_HotKeyAltTab(%ld)"), photKeyAltTab);
1373 HRESULT hr = pIMsRdpClientAdvancedSettings->put_HotKeyAltTab(photKeyAltTab);
1374 dbgprintf(TEXT("CAdvancedSettings::put_HotKeyAltTab -> %08X"), hr);
1375 return hr;
1376 }
1377
1378 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyAltTab(long * photKeyAltTab)
1379 {
1380 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1381 dbgprintf(TEXT("CAdvancedSettings::get_HotKeyAltTab(%p)"), photKeyAltTab);
1382 HRESULT hr = pIMsRdpClientAdvancedSettings->get_HotKeyAltTab(photKeyAltTab);
1383 dbgprintf(TEXT("CAdvancedSettings::get_HotKeyAltTab -> %08X, hotKeyAltTab = %ld"), hr, *photKeyAltTab);
1384 return hr;
1385 }
1386
1387 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_HotKeyAltShiftTab(long photKeyAltShiftTab)
1388 {
1389 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1390 dbgprintf(TEXT("CAdvancedSettings::put_HotKeyAltShiftTab(%ld)"), photKeyAltShiftTab);
1391 HRESULT hr = pIMsRdpClientAdvancedSettings->put_HotKeyAltShiftTab(photKeyAltShiftTab);
1392 dbgprintf(TEXT("CAdvancedSettings::put_HotKeyAltShiftTab -> %08X"), hr);
1393 return hr;
1394 }
1395
1396 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyAltShiftTab(long * photKeyAltShiftTab)
1397 {
1398 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1399 dbgprintf(TEXT("CAdvancedSettings::get_HotKeyAltShiftTab(%p)"), photKeyAltShiftTab);
1400 HRESULT hr = pIMsRdpClientAdvancedSettings->get_HotKeyAltShiftTab(photKeyAltShiftTab);
1401 dbgprintf(TEXT("CAdvancedSettings::get_HotKeyAltShiftTab -> %08X, hotKeyAltShiftTab = %ld"), hr, *photKeyAltShiftTab);
1402 return hr;
1403 }
1404
1405 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_HotKeyAltSpace(long photKeyAltSpace)
1406 {
1407 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1408 dbgprintf(TEXT("CAdvancedSettings::put_HotKeyAltSpace(%ld)"), photKeyAltSpace);
1409 HRESULT hr = pIMsRdpClientAdvancedSettings->put_HotKeyAltSpace(photKeyAltSpace);
1410 dbgprintf(TEXT("CAdvancedSettings::put_HotKeyAltSpace -> %08X"), hr);
1411 return hr;
1412 }
1413
1414 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyAltSpace(long * photKeyAltSpace)
1415 {
1416 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1417 dbgprintf(TEXT("CAdvancedSettings::get_HotKeyAltSpace(%p)"), photKeyAltSpace);
1418 HRESULT hr = pIMsRdpClientAdvancedSettings->get_HotKeyAltSpace(photKeyAltSpace);
1419 dbgprintf(TEXT("CAdvancedSettings::get_HotKeyAltSpace -> %08X, hotKeyAltSpace = %ld"), hr, *photKeyAltSpace);
1420 return hr;
1421 }
1422
1423 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_HotKeyCtrlAltDel(long photKeyCtrlAltDel)
1424 {
1425 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1426 dbgprintf(TEXT("CAdvancedSettings::put_HotKeyCtrlAltDel(%ld)"), photKeyCtrlAltDel);
1427 HRESULT hr = pIMsRdpClientAdvancedSettings->put_HotKeyCtrlAltDel(photKeyCtrlAltDel);
1428 dbgprintf(TEXT("CAdvancedSettings::put_HotKeyCtrlAltDel -> %08X"), hr);
1429 return hr;
1430 }
1431
1432 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyCtrlAltDel(long * photKeyCtrlAltDel)
1433 {
1434 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1435 dbgprintf(TEXT("CAdvancedSettings::get_HotKeyCtrlAltDel(%p)"), photKeyCtrlAltDel);
1436 HRESULT hr = pIMsRdpClientAdvancedSettings->get_HotKeyCtrlAltDel(photKeyCtrlAltDel);
1437 dbgprintf(TEXT("CAdvancedSettings::get_HotKeyCtrlAltDel -> %08X, hotKeyCtrlAltDel = %ld"), hr, *photKeyCtrlAltDel);
1438 return hr;
1439 }
1440
1441 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_orderDrawThreshold(long porderDrawThreshold)
1442 {
1443 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1444 dbgprintf(TEXT("CAdvancedSettings::put_orderDrawThreshold(%ld)"), porderDrawThreshold);
1445 HRESULT hr = pIMsRdpClientAdvancedSettings->put_orderDrawThreshold(porderDrawThreshold);
1446 dbgprintf(TEXT("CAdvancedSettings::put_orderDrawThreshold -> %08X"), hr);
1447 return hr;
1448 }
1449
1450 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_orderDrawThreshold(long * porderDrawThreshold)
1451 {
1452 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1453 dbgprintf(TEXT("CAdvancedSettings::get_orderDrawThreshold(%p)"), porderDrawThreshold);
1454 HRESULT hr = pIMsRdpClientAdvancedSettings->get_orderDrawThreshold(porderDrawThreshold);
1455 dbgprintf(TEXT("CAdvancedSettings::get_orderDrawThreshold -> %08X, orderDrawThreshold = %ld"), hr, *porderDrawThreshold);
1456 return hr;
1457 }
1458
1459 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_BitmapCacheSize(long pbitmapCacheSize)
1460 {
1461 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1462 dbgprintf(TEXT("CAdvancedSettings::put_BitmapCacheSize(%ld)"), pbitmapCacheSize);
1463 HRESULT hr = pIMsRdpClientAdvancedSettings->put_BitmapCacheSize(pbitmapCacheSize);
1464 dbgprintf(TEXT("CAdvancedSettings::put_BitmapCacheSize -> %08X"), hr);
1465 return hr;
1466 }
1467
1468 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_BitmapCacheSize(long * pbitmapCacheSize)
1469 {
1470 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1471 dbgprintf(TEXT("CAdvancedSettings::get_BitmapCacheSize(%p)"), pbitmapCacheSize);
1472 HRESULT hr = pIMsRdpClientAdvancedSettings->get_BitmapCacheSize(pbitmapCacheSize);
1473 dbgprintf(TEXT("CAdvancedSettings::get_BitmapCacheSize -> %08X, bitmapCacheSize = %ld"), hr, *pbitmapCacheSize);
1474 return hr;
1475 }
1476
1477 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_BitmapVirtualCacheSize(long pbitmapVirtualCacheSize)
1478 {
1479 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1480 dbgprintf(TEXT("CAdvancedSettings::put_BitmapVirtualCacheSize(%ld)"), pbitmapVirtualCacheSize);
1481 HRESULT hr = pIMsRdpClientAdvancedSettings->put_BitmapVirtualCacheSize(pbitmapVirtualCacheSize);
1482 dbgprintf(TEXT("CAdvancedSettings::put_BitmapVirtualCacheSize -> %08X"), hr);
1483 return hr;
1484 }
1485
1486 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_BitmapVirtualCacheSize(long * pbitmapVirtualCacheSize)
1487 {
1488 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1489 dbgprintf(TEXT("CAdvancedSettings::get_BitmapVirtualCacheSize(%p)"), pbitmapVirtualCacheSize);
1490 HRESULT hr = pIMsRdpClientAdvancedSettings->get_BitmapVirtualCacheSize(pbitmapVirtualCacheSize);
1491 dbgprintf(TEXT("CAdvancedSettings::get_BitmapVirtualCacheSize -> %08X, bitmapVirtualCacheSize = %ld"), hr, *pbitmapVirtualCacheSize);
1492 return hr;
1493 }
1494
1495 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_ScaleBitmapCachesByBPP(long pbScale)
1496 {
1497 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1498 dbgprintf(TEXT("CAdvancedSettings::put_ScaleBitmapCachesByBPP(%ld)"), pbScale);
1499 HRESULT hr = pIMsRdpClientAdvancedSettings->put_ScaleBitmapCachesByBPP(pbScale);
1500 dbgprintf(TEXT("CAdvancedSettings::put_ScaleBitmapCachesByBPP -> %08X"), hr);
1501 return hr;
1502 }
1503
1504 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_ScaleBitmapCachesByBPP(long * pbScale)
1505 {
1506 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1507 dbgprintf(TEXT("CAdvancedSettings::get_ScaleBitmapCachesByBPP(%p)"), pbScale);
1508 HRESULT hr = pIMsRdpClientAdvancedSettings->get_ScaleBitmapCachesByBPP(pbScale);
1509 dbgprintf(TEXT("CAdvancedSettings::get_ScaleBitmapCachesByBPP -> %08X, bScale = %ld"), hr, *pbScale);
1510 return hr;
1511 }
1512
1513 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_NumBitmapCaches(long pnumBitmapCaches)
1514 {
1515 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1516 dbgprintf(TEXT("CAdvancedSettings::put_NumBitmapCaches(%ld)"), pnumBitmapCaches);
1517 HRESULT hr = pIMsRdpClientAdvancedSettings->put_NumBitmapCaches(pnumBitmapCaches);
1518 dbgprintf(TEXT("CAdvancedSettings::put_NumBitmapCaches -> %08X"), hr);
1519 return hr;
1520 }
1521
1522 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_NumBitmapCaches(long * pnumBitmapCaches)
1523 {
1524 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1525 dbgprintf(TEXT("CAdvancedSettings::get_NumBitmapCaches(%p)"), pnumBitmapCaches);
1526 HRESULT hr = pIMsRdpClientAdvancedSettings->get_NumBitmapCaches(pnumBitmapCaches);
1527 dbgprintf(TEXT("CAdvancedSettings::get_NumBitmapCaches -> %08X, numBitmapCaches = %ld"), hr, *pnumBitmapCaches);
1528 return hr;
1529 }
1530
1531 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_CachePersistenceActive(long pcachePersistenceActive)
1532 {
1533 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1534 dbgprintf(TEXT("CAdvancedSettings::put_CachePersistenceActive(%ld)"), pcachePersistenceActive);
1535 HRESULT hr = pIMsRdpClientAdvancedSettings->put_CachePersistenceActive(pcachePersistenceActive);
1536 dbgprintf(TEXT("CAdvancedSettings::put_CachePersistenceActive -> %08X"), hr);
1537 return hr;
1538 }
1539
1540 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_CachePersistenceActive(long * pcachePersistenceActive)
1541 {
1542 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1543 dbgprintf(TEXT("CAdvancedSettings::get_CachePersistenceActive(%p)"), pcachePersistenceActive);
1544 HRESULT hr = pIMsRdpClientAdvancedSettings->get_CachePersistenceActive(pcachePersistenceActive);
1545 dbgprintf(TEXT("CAdvancedSettings::get_CachePersistenceActive -> %08X, cachePersistenceActive = %ld"), hr, *pcachePersistenceActive);
1546 return hr;
1547 }
1548
1549 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_PersistCacheDirectory(BSTR rhs)
1550 {
1551 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1552 dbgprintf(TEXT("CAdvancedSettings::put_PersistCacheDirectory(%ls)"), rhs);
1553 HRESULT hr = pIMsRdpClientAdvancedSettings->put_PersistCacheDirectory(rhs);
1554 dbgprintf(TEXT("CAdvancedSettings::put_PersistCacheDirectory -> %08X"), hr);
1555 return hr;
1556 }
1557
1558 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_brushSupportLevel(long pbrushSupportLevel)
1559 {
1560 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1561 dbgprintf(TEXT("CAdvancedSettings::put_brushSupportLevel(%ld)"), pbrushSupportLevel);
1562 HRESULT hr = pIMsRdpClientAdvancedSettings->put_brushSupportLevel(pbrushSupportLevel);
1563 dbgprintf(TEXT("CAdvancedSettings::put_brushSupportLevel -> %08X"), hr);
1564 return hr;
1565 }
1566
1567 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_brushSupportLevel(long * pbrushSupportLevel)
1568 {
1569 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1570 dbgprintf(TEXT("CAdvancedSettings::get_brushSupportLevel(%p)"), pbrushSupportLevel);
1571 HRESULT hr = pIMsRdpClientAdvancedSettings->get_brushSupportLevel(pbrushSupportLevel);
1572 dbgprintf(TEXT("CAdvancedSettings::get_brushSupportLevel -> %08X, brushSupportLevel = %ld"), hr, *pbrushSupportLevel);
1573 return hr;
1574 }
1575
1576 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_minInputSendInterval(long pminInputSendInterval)
1577 {
1578 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1579 dbgprintf(TEXT("CAdvancedSettings::put_minInputSendInterval(%ld)"), pminInputSendInterval);
1580 HRESULT hr = pIMsRdpClientAdvancedSettings->put_minInputSendInterval(pminInputSendInterval);
1581 dbgprintf(TEXT("CAdvancedSettings::put_minInputSendInterval -> %08X"), hr);
1582 return hr;
1583 }
1584
1585 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_minInputSendInterval(long * pminInputSendInterval)
1586 {
1587 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1588 dbgprintf(TEXT("CAdvancedSettings::get_minInputSendInterval(%p)"), pminInputSendInterval);
1589 HRESULT hr = pIMsRdpClientAdvancedSettings->get_minInputSendInterval(pminInputSendInterval);
1590 dbgprintf(TEXT("CAdvancedSettings::get_minInputSendInterval -> %08X, minInputSendInterval = %ld"), hr, *pminInputSendInterval);
1591 return hr;
1592 }
1593
1594 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_InputEventsAtOnce(long pinputEventsAtOnce)
1595 {
1596 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1597 dbgprintf(TEXT("CAdvancedSettings::put_InputEventsAtOnce(%ld)"), pinputEventsAtOnce);
1598 HRESULT hr = pIMsRdpClientAdvancedSettings->put_InputEventsAtOnce(pinputEventsAtOnce);
1599 dbgprintf(TEXT("CAdvancedSettings::put_InputEventsAtOnce -> %08X"), hr);
1600 return hr;
1601 }
1602
1603 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_InputEventsAtOnce(long * pinputEventsAtOnce)
1604 {
1605 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1606 dbgprintf(TEXT("CAdvancedSettings::get_InputEventsAtOnce(%p)"), pinputEventsAtOnce);
1607 HRESULT hr = pIMsRdpClientAdvancedSettings->get_InputEventsAtOnce(pinputEventsAtOnce);
1608 dbgprintf(TEXT("CAdvancedSettings::get_InputEventsAtOnce -> %08X, inputEventsAtOnce = %ld"), hr, *pinputEventsAtOnce);
1609 return hr;
1610 }
1611
1612 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_maxEventCount(long pmaxEventCount)
1613 {
1614 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1615 dbgprintf(TEXT("CAdvancedSettings::put_maxEventCount(%ld)"), pmaxEventCount);
1616 HRESULT hr = pIMsRdpClientAdvancedSettings->put_maxEventCount(pmaxEventCount);
1617 dbgprintf(TEXT("CAdvancedSettings::put_maxEventCount -> %08X"), hr);
1618 return hr;
1619 }
1620
1621 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_maxEventCount(long * pmaxEventCount)
1622 {
1623 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1624 dbgprintf(TEXT("CAdvancedSettings::get_maxEventCount(%p)"), pmaxEventCount);
1625 HRESULT hr = pIMsRdpClientAdvancedSettings->get_maxEventCount(pmaxEventCount);
1626 dbgprintf(TEXT("CAdvancedSettings::get_maxEventCount -> %08X, maxEventCount = %ld"), hr, *pmaxEventCount);
1627 return hr;
1628 }
1629
1630 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_keepAliveInterval(long pkeepAliveInterval)
1631 {
1632 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1633 dbgprintf(TEXT("CAdvancedSettings::put_keepAliveInterval(%ld)"), pkeepAliveInterval);
1634 HRESULT hr = pIMsRdpClientAdvancedSettings->put_keepAliveInterval(pkeepAliveInterval);
1635 dbgprintf(TEXT("CAdvancedSettings::put_keepAliveInterval -> %08X"), hr);
1636 return hr;
1637 }
1638
1639 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_keepAliveInterval(long * pkeepAliveInterval)
1640 {
1641 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1642 dbgprintf(TEXT("CAdvancedSettings::get_keepAliveInterval(%p)"), pkeepAliveInterval);
1643 HRESULT hr = pIMsRdpClientAdvancedSettings->get_keepAliveInterval(pkeepAliveInterval);
1644 dbgprintf(TEXT("CAdvancedSettings::get_keepAliveInterval -> %08X, keepAliveInterval = %ld"), hr, *pkeepAliveInterval);
1645 return hr;
1646 }
1647
1648 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_shutdownTimeout(long pshutdownTimeout)
1649 {
1650 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1651 dbgprintf(TEXT("CAdvancedSettings::put_shutdownTimeout(%ld)"), pshutdownTimeout);
1652 HRESULT hr = pIMsRdpClientAdvancedSettings->put_shutdownTimeout(pshutdownTimeout);
1653 dbgprintf(TEXT("CAdvancedSettings::put_shutdownTimeout -> %08X"), hr);
1654 return hr;
1655 }
1656
1657 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_shutdownTimeout(long * pshutdownTimeout)
1658 {
1659 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1660 dbgprintf(TEXT("CAdvancedSettings::get_shutdownTimeout(%p)"), pshutdownTimeout);
1661 HRESULT hr = pIMsRdpClientAdvancedSettings->get_shutdownTimeout(pshutdownTimeout);
1662 dbgprintf(TEXT("CAdvancedSettings::get_shutdownTimeout -> %08X, shutdownTimeout = %ld"), hr, *pshutdownTimeout);
1663 return hr;
1664 }
1665
1666 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_overallConnectionTimeout(long poverallConnectionTimeout)
1667 {
1668 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1669 dbgprintf(TEXT("CAdvancedSettings::put_overallConnectionTimeout(%ld)"), poverallConnectionTimeout);
1670 HRESULT hr = pIMsRdpClientAdvancedSettings->put_overallConnectionTimeout(poverallConnectionTimeout);
1671 dbgprintf(TEXT("CAdvancedSettings::put_overallConnectionTimeout -> %08X"), hr);
1672 return hr;
1673 }
1674
1675 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_overallConnectionTimeout(long * poverallConnectionTimeout)
1676 {
1677 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1678 dbgprintf(TEXT("CAdvancedSettings::get_overallConnectionTimeout(%p)"), poverallConnectionTimeout);
1679 HRESULT hr = pIMsRdpClientAdvancedSettings->get_overallConnectionTimeout(poverallConnectionTimeout);
1680 dbgprintf(TEXT("CAdvancedSettings::get_overallConnectionTimeout -> %08X, overallConnectionTimeout = %ld"), hr, *poverallConnectionTimeout);
1681 return hr;
1682 }
1683
1684 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_singleConnectionTimeout(long psingleConnectionTimeout)
1685 {
1686 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1687 dbgprintf(TEXT("CAdvancedSettings::put_singleConnectionTimeout(%ld)"), psingleConnectionTimeout);
1688 HRESULT hr = pIMsRdpClientAdvancedSettings->put_singleConnectionTimeout(psingleConnectionTimeout);
1689 dbgprintf(TEXT("CAdvancedSettings::put_singleConnectionTimeout -> %08X"), hr);
1690 return hr;
1691 }
1692
1693 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_singleConnectionTimeout(long * psingleConnectionTimeout)
1694 {
1695 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1696 dbgprintf(TEXT("CAdvancedSettings::get_singleConnectionTimeout(%p)"), psingleConnectionTimeout);
1697 HRESULT hr = pIMsRdpClientAdvancedSettings->get_singleConnectionTimeout(psingleConnectionTimeout);
1698 dbgprintf(TEXT("CAdvancedSettings::get_singleConnectionTimeout -> %08X, singleConnectionTimeout = %ld"), hr, *psingleConnectionTimeout);
1699 return hr;
1700 }
1701
1702 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_KeyboardType(long pkeyboardType)
1703 {
1704 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1705 dbgprintf(TEXT("CAdvancedSettings::put_KeyboardType(%ld)"), pkeyboardType);
1706 HRESULT hr = pIMsRdpClientAdvancedSettings->put_KeyboardType(pkeyboardType);
1707 dbgprintf(TEXT("CAdvancedSettings::put_KeyboardType -> %08X"), hr);
1708 return hr;
1709 }
1710
1711 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_KeyboardType(long * pkeyboardType)
1712 {
1713 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1714 dbgprintf(TEXT("CAdvancedSettings::get_KeyboardType(%p)"), pkeyboardType);
1715 HRESULT hr = pIMsRdpClientAdvancedSettings->get_KeyboardType(pkeyboardType);
1716 dbgprintf(TEXT("CAdvancedSettings::get_KeyboardType -> %08X, keyboardType = %ld"), hr, *pkeyboardType);
1717 return hr;
1718 }
1719
1720 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_KeyboardSubType(long pkeyboardSubType)
1721 {
1722 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1723 dbgprintf(TEXT("CAdvancedSettings::put_KeyboardSubType(%ld)"), pkeyboardSubType);
1724 HRESULT hr = pIMsRdpClientAdvancedSettings->put_KeyboardSubType(pkeyboardSubType);
1725 dbgprintf(TEXT("CAdvancedSettings::put_KeyboardSubType -> %08X"), hr);
1726 return hr;
1727 }
1728
1729 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_KeyboardSubType(long * pkeyboardSubType)
1730 {
1731 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1732 dbgprintf(TEXT("CAdvancedSettings::get_KeyboardSubType(%p)"), pkeyboardSubType);
1733 HRESULT hr = pIMsRdpClientAdvancedSettings->get_KeyboardSubType(pkeyboardSubType);
1734 dbgprintf(TEXT("CAdvancedSettings::get_KeyboardSubType -> %08X, keyboardSubType = %ld"), hr, *pkeyboardSubType);
1735 return hr;
1736 }
1737
1738 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_KeyboardFunctionKey(long pkeyboardFunctionKey)
1739 {
1740 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1741 dbgprintf(TEXT("CAdvancedSettings::put_KeyboardFunctionKey(%ld)"), pkeyboardFunctionKey);
1742 HRESULT hr = pIMsRdpClientAdvancedSettings->put_KeyboardFunctionKey(pkeyboardFunctionKey);
1743 dbgprintf(TEXT("CAdvancedSettings::put_KeyboardFunctionKey -> %08X"), hr);
1744 return hr;
1745 }
1746
1747 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_KeyboardFunctionKey(long * pkeyboardFunctionKey)
1748 {
1749 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1750 dbgprintf(TEXT("CAdvancedSettings::get_KeyboardFunctionKey(%p)"), pkeyboardFunctionKey);
1751 HRESULT hr = pIMsRdpClientAdvancedSettings->get_KeyboardFunctionKey(pkeyboardFunctionKey);
1752 dbgprintf(TEXT("CAdvancedSettings::get_KeyboardFunctionKey -> %08X, keyboardFunctionKey = %ld"), hr, *pkeyboardFunctionKey);
1753 return hr;
1754 }
1755
1756 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_WinceFixedPalette(long pwinceFixedPalette)
1757 {
1758 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1759 dbgprintf(TEXT("CAdvancedSettings::put_WinceFixedPalette(%ld)"), pwinceFixedPalette);
1760 HRESULT hr = pIMsRdpClientAdvancedSettings->put_WinceFixedPalette(pwinceFixedPalette);
1761 dbgprintf(TEXT("CAdvancedSettings::put_WinceFixedPalette -> %08X"), hr);
1762 return hr;
1763 }
1764
1765 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_WinceFixedPalette(long * pwinceFixedPalette)
1766 {
1767 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1768 dbgprintf(TEXT("CAdvancedSettings::get_WinceFixedPalette(%p)"), pwinceFixedPalette);
1769 HRESULT hr = pIMsRdpClientAdvancedSettings->get_WinceFixedPalette(pwinceFixedPalette);
1770 dbgprintf(TEXT("CAdvancedSettings::get_WinceFixedPalette -> %08X, winceFixedPalette = %ld"), hr, *pwinceFixedPalette);
1771 return hr;
1772 }
1773
1774 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_ConnectToServerConsole(VARIANT_BOOL pConnectToConsole)
1775 {
1776 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1777 dbgprintf(TEXT("CAdvancedSettings::put_ConnectToServerConsole(%s)"), BooleanToString(pConnectToConsole));
1778 HRESULT hr = pIMsRdpClientAdvancedSettings->put_ConnectToServerConsole(pConnectToConsole);
1779 dbgprintf(TEXT("CAdvancedSettings::put_ConnectToServerConsole -> %08X"), hr);
1780 return hr;
1781 }
1782
1783 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_ConnectToServerConsole(VARIANT_BOOL * pConnectToConsole)
1784 {
1785 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1786 dbgprintf(TEXT("CAdvancedSettings::get_ConnectToServerConsole(%p)"), pConnectToConsole);
1787 HRESULT hr = pIMsRdpClientAdvancedSettings->get_ConnectToServerConsole(pConnectToConsole);
1788 dbgprintf(TEXT("CAdvancedSettings::get_ConnectToServerConsole -> %08X, ConnectToConsole = %s"), hr, BooleanToString(*pConnectToConsole));
1789 return hr;
1790 }
1791
1792 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_BitmapPersistence(long pbitmapPersistence)
1793 {
1794 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1795 dbgprintf(TEXT("CAdvancedSettings::put_BitmapPersistence(%ld)"), pbitmapPersistence);
1796 HRESULT hr = pIMsRdpClientAdvancedSettings->put_BitmapPersistence(pbitmapPersistence);
1797 dbgprintf(TEXT("CAdvancedSettings::put_BitmapPersistence -> %08X"), hr);
1798 return hr;
1799 }
1800
1801 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_BitmapPersistence(long * pbitmapPersistence)
1802 {
1803 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1804 dbgprintf(TEXT("CAdvancedSettings::get_BitmapPersistence(%p)"), pbitmapPersistence);
1805 HRESULT hr = pIMsRdpClientAdvancedSettings->get_BitmapPersistence(pbitmapPersistence);
1806 dbgprintf(TEXT("CAdvancedSettings::get_BitmapPersistence -> %08X, bitmapPersistence = %ld"), hr, *pbitmapPersistence);
1807 return hr;
1808 }
1809
1810 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_MinutesToIdleTimeout(long pminutesToIdleTimeout)
1811 {
1812 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1813 dbgprintf(TEXT("CAdvancedSettings::put_MinutesToIdleTimeout(%ld)"), pminutesToIdleTimeout);
1814 HRESULT hr = pIMsRdpClientAdvancedSettings->put_MinutesToIdleTimeout(pminutesToIdleTimeout);
1815 dbgprintf(TEXT("CAdvancedSettings::put_MinutesToIdleTimeout -> %08X"), hr);
1816 return hr;
1817 }
1818
1819 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_MinutesToIdleTimeout(long * pminutesToIdleTimeout)
1820 {
1821 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1822 dbgprintf(TEXT("CAdvancedSettings::get_MinutesToIdleTimeout(%p)"), pminutesToIdleTimeout);
1823 HRESULT hr = pIMsRdpClientAdvancedSettings->get_MinutesToIdleTimeout(pminutesToIdleTimeout);
1824 dbgprintf(TEXT("CAdvancedSettings::get_MinutesToIdleTimeout -> %08X, minutesToIdleTimeout = %ld"), hr, *pminutesToIdleTimeout);
1825 return hr;
1826 }
1827
1828 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_SmartSizing(VARIANT_BOOL pfSmartSizing)
1829 {
1830 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1831 dbgprintf(TEXT("CAdvancedSettings::put_SmartSizing(%s)"), BooleanToString(pfSmartSizing));
1832 HRESULT hr = pIMsRdpClientAdvancedSettings->put_SmartSizing(pfSmartSizing);
1833 dbgprintf(TEXT("CAdvancedSettings::put_SmartSizing -> %08X"), hr);
1834 return hr;
1835 }
1836
1837 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_SmartSizing(VARIANT_BOOL * pfSmartSizing)
1838 {
1839 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1840 dbgprintf(TEXT("CAdvancedSettings::get_SmartSizing(%p)"), pfSmartSizing);
1841 HRESULT hr = pIMsRdpClientAdvancedSettings->get_SmartSizing(pfSmartSizing);
1842 dbgprintf(TEXT("CAdvancedSettings::get_SmartSizing -> %08X, fSmartSizing = %s"), hr, BooleanToString(*pfSmartSizing));
1843 return hr;
1844 }
1845
1846 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_RdpdrLocalPrintingDocName(BSTR pLocalPrintingDocName)
1847 {
1848 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1849 dbgprintf(TEXT("CAdvancedSettings::put_RdpdrLocalPrintingDocName(%ls)"), pLocalPrintingDocName);
1850 HRESULT hr = pIMsRdpClientAdvancedSettings->put_RdpdrLocalPrintingDocName(pLocalPrintingDocName);
1851 dbgprintf(TEXT("CAdvancedSettings::put_RdpdrLocalPrintingDocName -> %08X"), hr);
1852 return hr;
1853 }
1854
1855 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RdpdrLocalPrintingDocName(BSTR * pLocalPrintingDocName)
1856 {
1857 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1858 dbgprintf(TEXT("CAdvancedSettings::get_RdpdrLocalPrintingDocName(%p)"), pLocalPrintingDocName);
1859 HRESULT hr = pIMsRdpClientAdvancedSettings->get_RdpdrLocalPrintingDocName(pLocalPrintingDocName);
1860 dbgprintf(TEXT("CAdvancedSettings::get_RdpdrLocalPrintingDocName -> %08X, LocalPrintingDocName = %ls"), hr, *pLocalPrintingDocName);
1861 return hr;
1862 }
1863
1864 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_RdpdrClipCleanTempDirString(BSTR clipCleanTempDirString)
1865 {
1866 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1867 dbgprintf(TEXT("CAdvancedSettings::put_RdpdrClipCleanTempDirString(%ls)"), clipCleanTempDirString);
1868 HRESULT hr = pIMsRdpClientAdvancedSettings->put_RdpdrClipCleanTempDirString(clipCleanTempDirString);
1869 dbgprintf(TEXT("CAdvancedSettings::put_RdpdrClipCleanTempDirString -> %08X"), hr);
1870 return hr;
1871 }
1872
1873 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RdpdrClipCleanTempDirString(BSTR * clipCleanTempDirString)
1874 {
1875 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1876 dbgprintf(TEXT("CAdvancedSettings::get_RdpdrClipCleanTempDirString(%p)"), clipCleanTempDirString);
1877 HRESULT hr = pIMsRdpClientAdvancedSettings->get_RdpdrClipCleanTempDirString(clipCleanTempDirString);
1878 dbgprintf(TEXT("CAdvancedSettings::get_RdpdrClipCleanTempDirString -> %08X, clipCleanTempDirString = %ls"), hr, *clipCleanTempDirString);
1879 return hr;
1880 }
1881
1882 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_RdpdrClipPasteInfoString(BSTR clipPasteInfoString)
1883 {
1884 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1885 dbgprintf(TEXT("CAdvancedSettings::put_RdpdrClipPasteInfoString(%ls)"), clipPasteInfoString);
1886 HRESULT hr = pIMsRdpClientAdvancedSettings->put_RdpdrClipPasteInfoString(clipPasteInfoString);
1887 dbgprintf(TEXT("CAdvancedSettings::put_RdpdrClipPasteInfoString -> %08X"), hr);
1888 return hr;
1889 }
1890
1891 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RdpdrClipPasteInfoString(BSTR * clipPasteInfoString)
1892 {
1893 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1894 dbgprintf(TEXT("CAdvancedSettings::get_RdpdrClipPasteInfoString(%p)"), clipPasteInfoString);
1895 HRESULT hr = pIMsRdpClientAdvancedSettings->get_RdpdrClipPasteInfoString(clipPasteInfoString);
1896 dbgprintf(TEXT("CAdvancedSettings::get_RdpdrClipPasteInfoString -> %08X, clipPasteInfoString = %ls"), hr, *clipPasteInfoString);
1897 return hr;
1898 }
1899
1900 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_ClearTextPassword(BSTR rhs)
1901 {
1902 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1903 dbgprintf(TEXT("CAdvancedSettings::put_ClearTextPassword(%ls)"), rhs);
1904 HRESULT hr = pIMsRdpClientAdvancedSettings->put_ClearTextPassword(rhs);
1905 dbgprintf(TEXT("CAdvancedSettings::put_ClearTextPassword -> %08X"), hr);
1906 return hr;
1907 }
1908
1909 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_DisplayConnectionBar(VARIANT_BOOL pDisplayConnectionBar)
1910 {
1911 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1912 dbgprintf(TEXT("CAdvancedSettings::put_DisplayConnectionBar(%s)"), BooleanToString(pDisplayConnectionBar));
1913 HRESULT hr = pIMsRdpClientAdvancedSettings->put_DisplayConnectionBar(pDisplayConnectionBar);
1914 dbgprintf(TEXT("CAdvancedSettings::put_DisplayConnectionBar -> %08X"), hr);
1915 return hr;
1916 }
1917
1918 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_DisplayConnectionBar(VARIANT_BOOL * pDisplayConnectionBar)
1919 {
1920 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1921 dbgprintf(TEXT("CAdvancedSettings::get_DisplayConnectionBar(%p)"), pDisplayConnectionBar);
1922 HRESULT hr = pIMsRdpClientAdvancedSettings->get_DisplayConnectionBar(pDisplayConnectionBar);
1923 dbgprintf(TEXT("CAdvancedSettings::get_DisplayConnectionBar -> %08X, DisplayConnectionBar = %s"), hr, BooleanToString(*pDisplayConnectionBar));
1924 return hr;
1925 }
1926
1927 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_PinConnectionBar(VARIANT_BOOL pPinConnectionBar)
1928 {
1929 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1930 dbgprintf(TEXT("CAdvancedSettings::put_PinConnectionBar(%s)"), BooleanToString(pPinConnectionBar));
1931 HRESULT hr = pIMsRdpClientAdvancedSettings->put_PinConnectionBar(pPinConnectionBar);
1932 dbgprintf(TEXT("CAdvancedSettings::put_PinConnectionBar -> %08X"), hr);
1933 return hr;
1934 }
1935
1936 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_PinConnectionBar(VARIANT_BOOL * pPinConnectionBar)
1937 {
1938 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1939 dbgprintf(TEXT("CAdvancedSettings::get_PinConnectionBar(%p)"), pPinConnectionBar);
1940 HRESULT hr = pIMsRdpClientAdvancedSettings->get_PinConnectionBar(pPinConnectionBar);
1941 dbgprintf(TEXT("CAdvancedSettings::get_PinConnectionBar -> %08X, PinConnectionBar = %s"), hr, BooleanToString(*pPinConnectionBar));
1942 return hr;
1943 }
1944
1945 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_GrabFocusOnConnect(VARIANT_BOOL pfGrabFocusOnConnect)
1946 {
1947 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1948 dbgprintf(TEXT("CAdvancedSettings::put_GrabFocusOnConnect(%s)"), BooleanToString(pfGrabFocusOnConnect));
1949 HRESULT hr = pIMsRdpClientAdvancedSettings->put_GrabFocusOnConnect(pfGrabFocusOnConnect);
1950 dbgprintf(TEXT("CAdvancedSettings::put_GrabFocusOnConnect -> %08X"), hr);
1951 return hr;
1952 }
1953
1954 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_GrabFocusOnConnect(VARIANT_BOOL * pfGrabFocusOnConnect)
1955 {
1956 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1957 dbgprintf(TEXT("CAdvancedSettings::get_GrabFocusOnConnect(%p)"), pfGrabFocusOnConnect);
1958 HRESULT hr = pIMsRdpClientAdvancedSettings->get_GrabFocusOnConnect(pfGrabFocusOnConnect);
1959 dbgprintf(TEXT("CAdvancedSettings::get_GrabFocusOnConnect -> %08X, fGrabFocusOnConnect = %s"), hr, BooleanToString(*pfGrabFocusOnConnect));
1960 return hr;
1961 }
1962
1963 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_LoadBalanceInfo(BSTR pLBInfo)
1964 {
1965 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1966 dbgprintf(TEXT("CAdvancedSettings::put_LoadBalanceInfo(%ls)"), pLBInfo);
1967 HRESULT hr = pIMsRdpClientAdvancedSettings->put_LoadBalanceInfo(pLBInfo);
1968 dbgprintf(TEXT("CAdvancedSettings::put_LoadBalanceInfo -> %08X"), hr);
1969 return hr;
1970 }
1971
1972 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_LoadBalanceInfo(BSTR * pLBInfo)
1973 {
1974 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1975 dbgprintf(TEXT("CAdvancedSettings::get_LoadBalanceInfo(%p)"), pLBInfo);
1976 HRESULT hr = pIMsRdpClientAdvancedSettings->get_LoadBalanceInfo(pLBInfo);
1977 dbgprintf(TEXT("CAdvancedSettings::get_LoadBalanceInfo -> %08X, LBInfo = %ls"), hr, *pLBInfo);
1978 return hr;
1979 }
1980
1981 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_RedirectDrives(VARIANT_BOOL pRedirectDrives)
1982 {
1983 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1984 dbgprintf(TEXT("CAdvancedSettings::put_RedirectDrives(%s)"), BooleanToString(pRedirectDrives));
1985 HRESULT hr = pIMsRdpClientAdvancedSettings->put_RedirectDrives(pRedirectDrives);
1986 dbgprintf(TEXT("CAdvancedSettings::put_RedirectDrives -> %08X"), hr);
1987 return hr;
1988 }
1989
1990 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RedirectDrives(VARIANT_BOOL * pRedirectDrives)
1991 {
1992 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
1993 dbgprintf(TEXT("CAdvancedSettings::get_RedirectDrives(%p)"), pRedirectDrives);
1994 HRESULT hr = pIMsRdpClientAdvancedSettings->get_RedirectDrives(pRedirectDrives);
1995 dbgprintf(TEXT("CAdvancedSettings::get_RedirectDrives -> %08X, RedirectDrives = %s"), hr, BooleanToString(*pRedirectDrives));
1996 return hr;
1997 }
1998
1999 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_RedirectPrinters(VARIANT_BOOL pRedirectPrinters)
2000 {
2001 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
2002 dbgprintf(TEXT("CAdvancedSettings::put_RedirectPrinters(%s)"), BooleanToString(pRedirectPrinters));
2003 HRESULT hr = pIMsRdpClientAdvancedSettings->put_RedirectPrinters(pRedirectPrinters);
2004 dbgprintf(TEXT("CAdvancedSettings::put_RedirectPrinters -> %08X"), hr);
2005 return hr;
2006 }
2007
2008 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RedirectPrinters(VARIANT_BOOL * pRedirectPrinters)
2009 {
2010 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
2011 dbgprintf(TEXT("CAdvancedSettings::get_RedirectPrinters(%p)"), pRedirectPrinters);
2012 HRESULT hr = pIMsRdpClientAdvancedSettings->get_RedirectPrinters(pRedirectPrinters);
2013 dbgprintf(TEXT("CAdvancedSettings::get_RedirectPrinters -> %08X, RedirectPrinters = %s"), hr, BooleanToString(*pRedirectPrinters));
2014 return hr;
2015 }
2016
2017 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_RedirectPorts(VARIANT_BOOL pRedirectPorts)
2018 {
2019 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
2020 dbgprintf(TEXT("CAdvancedSettings::put_RedirectPorts(%s)"), BooleanToString(pRedirectPorts));
2021 HRESULT hr = pIMsRdpClientAdvancedSettings->put_RedirectPorts(pRedirectPorts);
2022 dbgprintf(TEXT("CAdvancedSettings::put_RedirectPorts -> %08X"), hr);
2023 return hr;
2024 }
2025
2026 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RedirectPorts(VARIANT_BOOL * pRedirectPorts)
2027 {
2028 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
2029 dbgprintf(TEXT("CAdvancedSettings::get_RedirectPorts(%p)"), pRedirectPorts);
2030 HRESULT hr = pIMsRdpClientAdvancedSettings->get_RedirectPorts(pRedirectPorts);
2031 dbgprintf(TEXT("CAdvancedSettings::get_RedirectPorts -> %08X, RedirectPorts = %s"), hr, BooleanToString(*pRedirectPorts));
2032 return hr;
2033 }
2034
2035 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_RedirectSmartCards(VARIANT_BOOL pRedirectSmartCards)
2036 {
2037 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
2038 dbgprintf(TEXT("CAdvancedSettings::put_RedirectSmartCards(%s)"), BooleanToString(pRedirectSmartCards));
2039 HRESULT hr = pIMsRdpClientAdvancedSettings->put_RedirectSmartCards(pRedirectSmartCards);
2040 dbgprintf(TEXT("CAdvancedSettings::put_RedirectSmartCards -> %08X"), hr);
2041 return hr;
2042 }
2043
2044 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RedirectSmartCards(VARIANT_BOOL * pRedirectSmartCards)
2045 {
2046 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
2047 dbgprintf(TEXT("CAdvancedSettings::get_RedirectSmartCards(%p)"), pRedirectSmartCards);
2048 HRESULT hr = pIMsRdpClientAdvancedSettings->get_RedirectSmartCards(pRedirectSmartCards);
2049 dbgprintf(TEXT("CAdvancedSettings::get_RedirectSmartCards -> %08X, RedirectSmartCards = %s"), hr, BooleanToString(*pRedirectSmartCards));
2050 return hr;
2051 }
2052
2053 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_BitmapVirtualCache16BppSize(long pBitmapVirtualCache16BppSize)
2054 {
2055 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
2056 dbgprintf(TEXT("CAdvancedSettings::put_BitmapVirtualCache16BppSize(%ld)"), pBitmapVirtualCache16BppSize);
2057 HRESULT hr = pIMsRdpClientAdvancedSettings->put_BitmapVirtualCache16BppSize(pBitmapVirtualCache16BppSize);
2058 dbgprintf(TEXT("CAdvancedSettings::put_BitmapVirtualCache16BppSize -> %08X"), hr);
2059 return hr;
2060 }
2061
2062 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_BitmapVirtualCache16BppSize(long * pBitmapVirtualCache16BppSize)
2063 {
2064 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
2065 dbgprintf(TEXT("CAdvancedSettings::get_BitmapVirtualCache16BppSize(%p)"), pBitmapVirtualCache16BppSize);
2066 HRESULT hr = pIMsRdpClientAdvancedSettings->get_BitmapVirtualCache16BppSize(pBitmapVirtualCache16BppSize);
2067 dbgprintf(TEXT("CAdvancedSettings::get_BitmapVirtualCache16BppSize -> %08X, BitmapVirtualCache16BppSize = %ld"), hr, *pBitmapVirtualCache16BppSize);
2068 return hr;
2069 }
2070
2071 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_BitmapVirtualCache24BppSize(long pBitmapVirtualCache24BppSize)
2072 {
2073 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
2074 dbgprintf(TEXT("CAdvancedSettings::put_BitmapVirtualCache24BppSize(%ld)"), pBitmapVirtualCache24BppSize);
2075 HRESULT hr = pIMsRdpClientAdvancedSettings->put_BitmapVirtualCache24BppSize(pBitmapVirtualCache24BppSize);
2076 dbgprintf(TEXT("CAdvancedSettings::put_BitmapVirtualCache24BppSize -> %08X"), hr);
2077 return hr;
2078 }
2079
2080 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_BitmapVirtualCache24BppSize(long * pBitmapVirtualCache24BppSize)
2081 {
2082 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
2083 dbgprintf(TEXT("CAdvancedSettings::get_BitmapVirtualCache24BppSize(%p)"), pBitmapVirtualCache24BppSize);
2084 HRESULT hr = pIMsRdpClientAdvancedSettings->get_BitmapVirtualCache24BppSize(pBitmapVirtualCache24BppSize);
2085 dbgprintf(TEXT("CAdvancedSettings::get_BitmapVirtualCache24BppSize -> %08X, BitmapVirtualCache24BppSize = %ld"), hr, *pBitmapVirtualCache24BppSize);
2086 return hr;
2087 }
2088
2089 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_PerformanceFlags(long pDisableList)
2090 {
2091 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
2092 dbgprintf(TEXT("CAdvancedSettings::put_PerformanceFlags(%ld)"), pDisableList);
2093 HRESULT hr = pIMsRdpClientAdvancedSettings->put_PerformanceFlags(pDisableList);
2094 dbgprintf(TEXT("CAdvancedSettings::put_PerformanceFlags -> %08X"), hr);
2095 return hr;
2096 }
2097
2098 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_PerformanceFlags(long * pDisableList)
2099 {
2100 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
2101 dbgprintf(TEXT("CAdvancedSettings::get_PerformanceFlags(%p)"), pDisableList);
2102 HRESULT hr = pIMsRdpClientAdvancedSettings->get_PerformanceFlags(pDisableList);
2103 dbgprintf(TEXT("CAdvancedSettings::get_PerformanceFlags -> %08X, DisableList = %ld"), hr, *pDisableList);
2104 return hr;
2105 }
2106
2107 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_ConnectWithEndpoint(VARIANT * rhs)
2108 {
2109 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
2110 dbgprintf(TEXT("CAdvancedSettings::put_ConnectWithEndpoint(%s)"), VariantToString(*rhs).c_str());
2111 HRESULT hr = pIMsRdpClientAdvancedSettings->put_ConnectWithEndpoint(rhs);
2112 dbgprintf(TEXT("CAdvancedSettings::put_ConnectWithEndpoint -> %08X"), hr);
2113 return hr;
2114 }
2115
2116 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::put_NotifyTSPublicKey(VARIANT_BOOL pfNotify)
2117 {
2118 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
2119 dbgprintf(TEXT("CAdvancedSettings::put_NotifyTSPublicKey(%s)"), BooleanToString(pfNotify));
2120 HRESULT hr = pIMsRdpClientAdvancedSettings->put_NotifyTSPublicKey(pfNotify);
2121 dbgprintf(TEXT("CAdvancedSettings::put_NotifyTSPublicKey -> %08X"), hr);
2122 return hr;
2123 }
2124
2125 virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_NotifyTSPublicKey(VARIANT_BOOL * pfNotify)
2126 {
2127 IMsRdpClientAdvancedSettings * pIMsRdpClientAdvancedSettings = getIMsRdpClientAdvancedSettings();
2128 dbgprintf(TEXT("CAdvancedSettings::get_NotifyTSPublicKey(%p)"), pfNotify);
2129 HRESULT hr = pIMsRdpClientAdvancedSettings->get_NotifyTSPublicKey(pfNotify);
2130 dbgprintf(TEXT("CAdvancedSettings::get_NotifyTSPublicKey -> %08X, fNotify = %s"), hr, BooleanToString(*pfNotify));
2131 return hr;
2132 }
2133
2134 /* IMsRdpClientAdvancedSettings2 */
2135 virtual STDMETHODIMP IMsRdpClientAdvancedSettings2::get_CanAutoReconnect(VARIANT_BOOL * pfCanAutoReconnect)
2136 {
2137 IMsRdpClientAdvancedSettings2 * pIMsRdpClientAdvancedSettings2 = getIMsRdpClientAdvancedSettings2();
2138 dbgprintf(TEXT("CAdvancedSettings::get_CanAutoReconnect(%p)"), pfCanAutoReconnect);
2139 HRESULT hr = pIMsRdpClientAdvancedSettings2->get_CanAutoReconnect(pfCanAutoReconnect);
2140 dbgprintf(TEXT("CAdvancedSettings::get_CanAutoReconnect -> %08X, fCanAutoReconnect = %s"), hr, BooleanToString(*pfCanAutoReconnect));
2141 return hr;
2142 }
2143
2144 virtual STDMETHODIMP IMsRdpClientAdvancedSettings2::put_EnableAutoReconnect(VARIANT_BOOL pfEnableAutoReconnect)
2145 {
2146 IMsRdpClientAdvancedSettings2 * pIMsRdpClientAdvancedSettings2 = getIMsRdpClientAdvancedSettings2();
2147 dbgprintf(TEXT("CAdvancedSettings::put_EnableAutoReconnect(%s)"), BooleanToString(pfEnableAutoReconnect));
2148 HRESULT hr = pIMsRdpClientAdvancedSettings2->put_EnableAutoReconnect(pfEnableAutoReconnect);
2149 dbgprintf(TEXT("CAdvancedSettings::put_EnableAutoReconnect -> %08X"), hr);
2150 return hr;
2151 }
2152
2153 virtual STDMETHODIMP IMsRdpClientAdvancedSettings2::get_EnableAutoReconnect(VARIANT_BOOL * pfEnableAutoReconnect)
2154 {
2155 IMsRdpClientAdvancedSettings2 * pIMsRdpClientAdvancedSettings2 = getIMsRdpClientAdvancedSettings2();
2156 dbgprintf(TEXT("CAdvancedSettings::get_EnableAutoReconnect(%p)"), pfEnableAutoReconnect);
2157 HRESULT hr = pIMsRdpClientAdvancedSettings2->get_EnableAutoReconnect(pfEnableAutoReconnect);
2158 dbgprintf(TEXT("CAdvancedSettings::get_EnableAutoReconnect -> %08X, fEnableAutoReconnect = %s"), hr, BooleanToString(*pfEnableAutoReconnect));
2159 return hr;
2160 }
2161
2162 virtual STDMETHODIMP IMsRdpClientAdvancedSettings2::put_MaxReconnectAttempts(long pMaxReconnectAttempts)
2163 {
2164 IMsRdpClientAdvancedSettings2 * pIMsRdpClientAdvancedSettings2 = getIMsRdpClientAdvancedSettings2();
2165 dbgprintf(TEXT("CAdvancedSettings::put_MaxReconnectAttempts(%ld)"), pMaxReconnectAttempts);
2166 HRESULT hr = pIMsRdpClientAdvancedSettings2->put_MaxReconnectAttempts(pMaxReconnectAttempts);
2167 dbgprintf(TEXT("CAdvancedSettings::put_MaxReconnectAttempts -> %08X"), hr);
2168 return hr;
2169 }
2170
2171 virtual STDMETHODIMP IMsRdpClientAdvancedSettings2::get_MaxReconnectAttempts(long * pMaxReconnectAttempts)
2172 {
2173 IMsRdpClientAdvancedSettings2 * pIMsRdpClientAdvancedSettings2 = getIMsRdpClientAdvancedSettings2();
2174 dbgprintf(TEXT("CAdvancedSettings::get_MaxReconnectAttempts(%p)"), pMaxReconnectAttempts);
2175 HRESULT hr = pIMsRdpClientAdvancedSettings2->get_MaxReconnectAttempts(pMaxReconnectAttempts);
2176 dbgprintf(TEXT("CAdvancedSettings::get_MaxReconnectAttempts -> %08X, MaxReconnectAttempts = %ld"), hr, *pMaxReconnectAttempts);
2177 return hr;
2178 }
2179
2180 /* IMsRdpClientAdvancedSettings3 */
2181 virtual STDMETHODIMP IMsRdpClientAdvancedSettings3::put_ConnectionBarShowMinimizeButton(VARIANT_BOOL pfShowMinimize)
2182 {
2183 IMsRdpClientAdvancedSettings3 * pIMsRdpClientAdvancedSettings3 = getIMsRdpClientAdvancedSettings3();
2184 dbgprintf(TEXT("CAdvancedSettings::put_ConnectionBarShowMinimizeButton(%s)"), BooleanToString(pfShowMinimize));
2185 HRESULT hr = pIMsRdpClientAdvancedSettings3->put_ConnectionBarShowMinimizeButton(pfShowMinimize);
2186 dbgprintf(TEXT("CAdvancedSettings::put_ConnectionBarShowMinimizeButton -> %08X"), hr);
2187 return hr;
2188 }
2189
2190 virtual STDMETHODIMP IMsRdpClientAdvancedSettings3::get_ConnectionBarShowMinimizeButton(VARIANT_BOOL * pfShowMinimize)
2191 {
2192 IMsRdpClientAdvancedSettings3 * pIMsRdpClientAdvancedSettings3 = getIMsRdpClientAdvancedSettings3();
2193 dbgprintf(TEXT("CAdvancedSettings::get_ConnectionBarShowMinimizeButton(%p)"), pfShowMinimize);
2194 HRESULT hr = pIMsRdpClientAdvancedSettings3->get_ConnectionBarShowMinimizeButton(pfShowMinimize);
2195 dbgprintf(TEXT("CAdvancedSettings::get_ConnectionBarShowMinimizeButton -> %08X, fShowMinimize = %s"), hr, BooleanToString(*pfShowMinimize));
2196 return hr;
2197 }
2198
2199 virtual STDMETHODIMP IMsRdpClientAdvancedSettings3::put_ConnectionBarShowRestoreButton(VARIANT_BOOL pfShowRestore)
2200 {
2201 IMsRdpClientAdvancedSettings3 * pIMsRdpClientAdvancedSettings3 = getIMsRdpClientAdvancedSettings3();
2202 dbgprintf(TEXT("CAdvancedSettings::put_ConnectionBarShowRestoreButton(%s)"), BooleanToString(pfShowRestore));
2203 HRESULT hr = pIMsRdpClientAdvancedSettings3->put_ConnectionBarShowRestoreButton(pfShowRestore);
2204 dbgprintf(TEXT("CAdvancedSettings::put_ConnectionBarShowRestoreButton -> %08X"), hr);
2205 return hr;
2206 }
2207
2208 virtual STDMETHODIMP IMsRdpClientAdvancedSettings3::get_ConnectionBarShowRestoreButton(VARIANT_BOOL * pfShowRestore)
2209 {
2210 IMsRdpClientAdvancedSettings3 * pIMsRdpClientAdvancedSettings3 = getIMsRdpClientAdvancedSettings3();
2211 dbgprintf(TEXT("CAdvancedSettings::get_ConnectionBarShowRestoreButton(%p)"), pfShowRestore);
2212 HRESULT hr = pIMsRdpClientAdvancedSettings3->get_ConnectionBarShowRestoreButton(pfShowRestore);
2213 dbgprintf(TEXT("CAdvancedSettings::get_ConnectionBarShowRestoreButton -> %08X, fShowRestore = %s"), hr, BooleanToString(*pfShowRestore));
2214 return hr;
2215 }
2216
2217 /* IMsRdpClientAdvancedSettings4 */
2218 virtual STDMETHODIMP IMsRdpClientAdvancedSettings4::put_AuthenticationLevel(unsigned int puiAuthLevel)
2219 {
2220 IMsRdpClientAdvancedSettings4 * pIMsRdpClientAdvancedSettings4 = getIMsRdpClientAdvancedSettings4();
2221 dbgprintf(TEXT("CAdvancedSettings::put_AuthenticationLevel(%u)"), puiAuthLevel);
2222 HRESULT hr = pIMsRdpClientAdvancedSettings4->put_AuthenticationLevel(puiAuthLevel);
2223 dbgprintf(TEXT("CAdvancedSettings::put_AuthenticationLevel -> %08X"), hr);
2224 return hr;
2225 }
2226 virtual STDMETHODIMP IMsRdpClientAdvancedSettings4::get_AuthenticationLevel(unsigned int * puiAuthLevel)
2227 {
2228 IMsRdpClientAdvancedSettings4 * pIMsRdpClientAdvancedSettings4 = getIMsRdpClientAdvancedSettings4();
2229 dbgprintf(TEXT("CAdvancedSettings::get_AuthenticationLevel(%p)"), puiAuthLevel);
2230 HRESULT hr = pIMsRdpClientAdvancedSettings4->get_AuthenticationLevel(puiAuthLevel);
2231 dbgprintf(TEXT("CAdvancedSettings::get_AuthenticationLevel -> %08X, uiAuthLevel = %ld"), hr, *puiAuthLevel);
2232 return hr;
2233 }
2234 };
2235
2236 class CoClass:
2237 /* Standard interfaces */
2238 public IUnknown,
2239 public IDispatch,
2241 public IDataObject,
2242 public IObjectSafety,
2243 public IOleControl,
2245 public IOleInPlaceObject,
2246 public IOleObject,
2247 public IOleWindow,
2248 public IPersist,
2249 public IPersistPropertyBag,
2250 public IPersistStorage,
2251 public IPersistStreamInit,
2252 public IProvideClassInfo,
2253 public IProvideClassInfo2,
2254 public IQuickActivate,
2255 public ISpecifyPropertyPages,
2256 public IViewObject,
2257 public IViewObject2,
2258
2259 /* RDP client interfaces */
2260 public IMsRdpClient4,
2262 {
2263 private:
2265
2267
2287
2296
2298 {
2299 if(m_IDispatch)
2300 return m_IDispatch;
2301
2302 if(m_IMsRdpClient)
2303 m_IDispatch = m_IMsRdpClient;
2304 else if(m_IMsRdpClient2)
2305 m_IDispatch = m_IMsRdpClient2;
2306 else if(m_IMsRdpClient3)
2307 m_IDispatch = m_IMsRdpClient3;
2308 else if(m_IMsRdpClient4)
2309 m_IDispatch = m_IMsRdpClient4;
2310 else if(m_IMsTscAx)
2311 m_IDispatch = m_IMsTscAx;
2312
2313 if(m_IDispatch)
2314 {
2315 m_IDispatch->AddRef();
2316 return m_IDispatch;
2317 }
2318
2319 if(SUCCEEDED(m_IUnknown->QueryInterface(&m_IDispatch)))
2320 return m_IDispatch;
2321
2322 return NULL;
2323 }
2324
2326 {
2327 if(m_IConnectionPointContainer)
2328 return m_IConnectionPointContainer;
2329
2330 m_IUnknown->QueryInterface(&m_IConnectionPointContainer);
2331 return m_IConnectionPointContainer;
2332
2333 }
2334
2336 {
2337 if(m_IDataObject)
2338 return m_IDataObject;
2339
2340 m_IUnknown->QueryInterface(&m_IDataObject);
2341 return m_IDataObject;
2342 }
2343
2345 {
2346 if(m_IObjectSafety)
2347 return m_IObjectSafety;
2348
2349 m_IUnknown->QueryInterface(&m_IObjectSafety);
2350 return m_IObjectSafety;
2351 }
2352
2354 {
2355 if(m_IOleControl)
2356 return m_IOleControl;
2357
2358 m_IUnknown->QueryInterface(&m_IOleControl);
2359 return m_IOleControl;
2360 }
2361
2363 {
2364 if(m_IOleInPlaceActiveObject)
2365 return m_IOleInPlaceActiveObject;
2366
2367 m_IUnknown->QueryInterface(&m_IOleInPlaceActiveObject);
2368 return m_IOleInPlaceActiveObject;
2369 }
2370
2372 {
2373 if(m_IOleInPlaceObject)
2374 return m_IOleInPlaceObject;
2375
2376 m_IUnknown->QueryInterface(&m_IOleInPlaceObject);
2377 return m_IOleInPlaceObject;
2378 }
2379
2381 {
2382 if(m_IOleObject)
2383 return m_IOleObject;
2384
2385 m_IUnknown->QueryInterface(&m_IOleObject);
2386 return m_IOleObject;
2387 }
2388
2390 {
2391 if(m_IOleWindow)
2392 return m_IOleWindow;
2393
2394 if(m_IOleInPlaceActiveObject)
2395 m_IOleWindow = m_IOleInPlaceActiveObject;
2396
2397 if(m_IOleWindow)
2398 {
2399 m_IOleWindow->AddRef();
2400 return m_IOleWindow;
2401 }
2402
2403 m_IUnknown->QueryInterface(&m_IOleWindow);
2404 return m_IOleWindow;
2405 }
2406
2408 {
2409 if(m_IPersist)
2410 return m_IPersist;
2411
2412 if(m_IPersistPropertyBag)
2413 m_IPersist = m_IPersistPropertyBag;
2414 else if(m_IPersistStorage)
2415 m_IPersist = m_IPersistStorage;
2416 else if(m_IPersistStreamInit)
2417 m_IPersist = m_IPersistStreamInit;
2418
2419 if(m_IPersist)
2420 {
2421 m_IPersist->AddRef();
2422 return m_IPersist;
2423 }
2424
2425 m_IUnknown->QueryInterface(&m_IPersist);
2426 return m_IPersist;
2427 }
2428
2430 {
2431 if(m_IPersistPropertyBag)
2432 return m_IPersistPropertyBag;
2433
2434 m_IUnknown->QueryInterface(&m_IPersistPropertyBag);
2435 return m_IPersistPropertyBag;
2436 }
2437
2439 {
2440 if(m_IPersistStorage)
2441 return m_IPersistStorage;
2442
2443 m_IUnknown->QueryInterface(&m_IPersistStorage);
2444 return m_IPersistStorage;
2445 }
2446
2448 {
2449 if(m_IPersistStreamInit)
2450 return m_IPersistStreamInit;
2451
2452 m_IUnknown->QueryInterface(&m_IPersistStreamInit);
2453 return m_IPersistStreamInit;
2454 }
2455
2457 {
2458 if(m_IProvideClassInfo)
2459 return m_IProvideClassInfo;
2460
2461 if(m_IProvideClassInfo2)
2462 m_IProvideClassInfo = m_IProvideClassInfo2;
2463
2464 if(m_IProvideClassInfo)
2465 {
2466 m_IProvideClassInfo->AddRef();
2467 return m_IProvideClassInfo;
2468 }
2469
2470 m_IUnknown->QueryInterface(&m_IProvideClassInfo);
2471 return m_IProvideClassInfo;
2472 }
2473
2475 {
2476 if(m_IProvideClassInfo2)
2477 return m_IProvideClassInfo2;
2478
2479 m_IUnknown->QueryInterface(&m_IProvideClassInfo2);
2480 return m_IProvideClassInfo2;
2481 }
2482
2484 {
2485 if(m_IQuickActivate)
2486 return m_IQuickActivate;
2487
2488 m_IUnknown->QueryInterface(&m_IQuickActivate);
2489 return m_IQuickActivate;
2490 }
2491
2493 {
2494 if(m_ISpecifyPropertyPages)
2495 return m_ISpecifyPropertyPages;
2496
2497 m_IUnknown->QueryInterface(&m_ISpecifyPropertyPages);
2498 return m_ISpecifyPropertyPages;
2499 }
2500
2502 {
2503 if(m_IViewObject)
2504 return m_IViewObject;
2505
2506 if(m_IViewObject2)
2507 m_IViewObject = m_IViewObject2;
2508
2509 if(m_IViewObject)
2510 {
2511 m_IViewObject->AddRef();
2512 return m_IViewObject;
2513 }
2514
2515 m_IUnknown->QueryInterface(&m_IViewObject);
2516 return m_IViewObject;
2517 }
2518
2520 {
2521 if(m_IViewObject2)
2522 return m_IViewObject2;
2523
2524 m_IUnknown->QueryInterface(&m_IViewObject2);
2525 return m_IViewObject2;
2526 }
2527
2529 {
2530 if(m_IMsRdpClient)
2531 return m_IMsRdpClient;
2532
2533 if(m_IMsRdpClient2)
2534 m_IMsRdpClient = m_IMsRdpClient2;
2535 else if(m_IMsRdpClient3)
2536 m_IMsRdpClient = m_IMsRdpClient3;
2537 else if(m_IMsRdpClient4)
2538 m_IMsRdpClient = m_IMsRdpClient4;
2539
2540 if(m_IMsRdpClient)
2541 {
2542 m_IMsRdpClient->AddRef();
2543 return m_IMsRdpClient;
2544 }
2545
2546 m_IUnknown->QueryInterface(&m_IMsRdpClient);
2547 return m_IMsRdpClient;
2548 }
2549
2551 {
2552 if(m_IMsRdpClient2)
2553 return m_IMsRdpClient2;
2554
2555 if(m_IMsRdpClient3)
2556 m_IMsRdpClient2 = m_IMsRdpClient3;
2557 else if(m_IMsRdpClient4)
2558 m_IMsRdpClient2 = m_IMsRdpClient4;
2559
2560 if(m_IMsRdpClient2)
2561 {
2562 m_IMsRdpClient2->AddRef();
2563 return m_IMsRdpClient2;
2564 }
2565
2566 m_IUnknown->QueryInterface(&m_IMsRdpClient2);
2567 return m_IMsRdpClient2;
2568 }
2569
2571 {
2572 if(m_IMsRdpClient3)
2573 return m_IMsRdpClient3;
2574
2575 if(m_IMsRdpClient4)
2576 m_IMsRdpClient3 = m_IMsRdpClient4;
2577
2578 if(m_IMsRdpClient3)
2579 {
2580 m_IMsRdpClient3->AddRef();
2581 return m_IMsRdpClient3;
2582 }
2583
2584 m_IUnknown->QueryInterface(&m_IMsRdpClient3);
2585 return m_IMsRdpClient3;
2586 }
2587
2589 {
2590 if(m_IMsRdpClient4)
2591 return m_IMsRdpClient4;
2592
2593 m_IUnknown->QueryInterface(&m_IMsRdpClient4);
2594 return m_IMsRdpClient4;
2595 }
2596
2598 {
2599 if(m_IMsTscAx)
2600 return m_IMsTscAx;
2601
2602 if(m_IMsRdpClient)
2603 m_IMsTscAx = m_IMsRdpClient;
2604 else if(m_IMsRdpClient2)
2605 m_IMsTscAx = m_IMsRdpClient2;
2606 else if(m_IMsRdpClient3)
2607 m_IMsTscAx = m_IMsRdpClient3;
2608 else if(m_IMsRdpClient4)
2609 m_IMsTscAx = m_IMsRdpClient4;
2610
2611 if(m_IMsTscAx)
2612 {
2613 m_IMsTscAx->AddRef();
2614 return m_IMsTscAx;
2615 }
2616
2617 m_IUnknown->QueryInterface(&m_IMsTscAx);
2618 return m_IMsTscAx;
2619 }
2620
2622 {
2623 if(m_IMsTscNonScriptable)
2624 return m_IMsTscNonScriptable;
2625
2626 if(m_IMsRdpClientNonScriptable)
2627 m_IMsTscNonScriptable = m_IMsRdpClientNonScriptable;
2628 else if(m_IMsRdpClientNonScriptable2)
2629 m_IMsTscNonScriptable = m_IMsRdpClientNonScriptable2;
2630
2631 if(m_IMsTscNonScriptable)
2632 {
2633 m_IMsTscNonScriptable->AddRef();
2634 return m_IMsTscNonScriptable;
2635 }
2636
2637 m_IUnknown->QueryInterface(&m_IMsTscNonScriptable);
2638 return m_IMsTscNonScriptable;
2639 }
2640
2642 {
2643 if(m_IMsRdpClientNonScriptable)
2644 return m_IMsRdpClientNonScriptable;
2645
2646 if(m_IMsRdpClientNonScriptable2)
2647 m_IMsRdpClientNonScriptable = m_IMsRdpClientNonScriptable2;
2648
2649 if(m_IMsRdpClientNonScriptable)
2650 {
2651 m_IMsRdpClientNonScriptable->AddRef();
2652 return m_IMsRdpClientNonScriptable;
2653 }
2654
2655 m_IUnknown->QueryInterface(&m_IMsRdpClientNonScriptable);
2656 return m_IMsRdpClientNonScriptable;
2657 }
2658
2660 {
2661 if(m_IMsRdpClientNonScriptable2)
2662 return m_IMsRdpClientNonScriptable2;
2663
2664 m_IUnknown->QueryInterface(&m_IMsRdpClientNonScriptable2);
2665 return m_IMsRdpClientNonScriptable2;
2666 }
2667
2668 private:
2670
2672 {
2673 HRESULT hr;
2674 IUnknown * pvObject = NULL;
2675
2676 dbgprintf(TEXT("IUnknown::QueryInterface(%ls, %p)"), UUIDToString(riid).c_str(), ppvObject);
2677
2678#define QIBEGIN() \
2679 if(riid == IID_IUnknown) \
2680 { \
2681 assert(0); \
2682 }
2683
2684#define QI(I) \
2685 else if(riid == IID_ ## I) \
2686 { \
2687 if(m_ ## I) \
2688 { \
2689 m_ ## I->AddRef(); \
2690 hr = S_OK; \
2691 } \
2692 else \
2693 { \
2694 hr = m_IUnknown->QueryInterface(&m_ ## I); \
2695 } \
2696 \
2697 if(SUCCEEDED(hr)) \
2698 pvObject = static_cast<I *>(this); \
2699 }
2700
2701#define QIEND() \
2702 else \
2703 { \
2704 hr = E_NOINTERFACE; \
2705 pvObject = NULL; \
2706 }
2707
2708 QIBEGIN()
2709
2710 /* Standard interfaces */
2711 QI(IDispatch)
2718 QI(IOleObject)
2719 QI(IOleWindow)
2720 QI(IPersist)
2730
2731 /* Terminal services client */
2736 QI(IMsTscAx)
2740 QIEND()
2741
2742#undef QIBEGIN
2743#undef QIEND
2744#undef QI
2745
2746 if(SUCCEEDED(hr))
2747 {
2748 assert(pvObject);
2749 pvObject->AddRef();
2750 }
2751 else
2752 {
2753 assert(pvObject == NULL);
2754 }
2755
2756 *ppvObject = pvObject;
2757
2758 dbgprintf(TEXT("IUnknown::QueryInterface -> %08X, ppvObject = %p"), hr, *ppvObject);
2759 return hr;
2760 }
2761
2763 {
2764 return InterlockedIncrement(&m_refCount);
2765 }
2766
2768 {
2769 LONG n = InterlockedDecrement(&m_refCount);
2770
2771 if(n == 0)
2772 delete this;
2773
2774 return n;
2775 }
2776
2777 friend class CoClassInner;
2778
2780 {
2781 public:
2783 {
2784 if(riid == IID_IUnknown)
2785 {
2786 AddRef();
2787 *ppvObject = this;
2788 return S_OK;
2789 }
2790
2791 return InnerToOuter(this)->queryInterface(riid, ppvObject);
2792 }
2793
2795 {
2796 return InnerToOuter(this)->addRef();
2797 }
2798
2800 {
2801 return InnerToOuter(this)->release();
2802 }
2803 }
2805
2807 {
2808 return CONTAINING_RECORD(inner, CoClass, m_inner);
2809 }
2810
2811 private:
2812 CoClass(IUnknown * pUnknw, IUnknown * pUnkOuter):
2813 m_refCount(1),
2814 m_outer(pUnkOuter),
2815 m_IUnknown(pUnknw),
2816 m_IDispatch(NULL),
2817 m_IConnectionPointContainer(NULL),
2818 m_IDataObject(NULL),
2819 m_IObjectSafety(NULL),
2820 m_IOleControl(NULL),
2821 m_IOleInPlaceActiveObject(NULL),
2822 m_IOleInPlaceObject(NULL),
2823 m_IOleObject(NULL),
2824 m_IOleWindow(NULL),
2825 m_IPersist(NULL),
2826 m_IPersistPropertyBag(NULL),
2827 m_IPersistStorage(NULL),
2828 m_IPersistStreamInit(NULL),
2829 m_IProvideClassInfo(NULL),
2830 m_IProvideClassInfo2(NULL),
2831 m_IQuickActivate(NULL),
2832 m_ISpecifyPropertyPages(NULL),
2833 m_IViewObject(NULL),
2834 m_IViewObject2(NULL),
2835 m_IMsRdpClient(NULL),
2836 m_IMsRdpClient2(NULL),
2837 m_IMsRdpClient3(NULL),
2838 m_IMsRdpClient4(NULL),
2839 m_IMsTscAx(NULL),
2840 m_IMsTscNonScriptable(NULL),
2841 m_IMsRdpClientNonScriptable(NULL),
2842 m_IMsRdpClientNonScriptable2(NULL)
2843 {
2844 if(m_outer == NULL)
2845 m_outer = &m_inner;
2846 }
2847
2848 public:
2849 static HRESULT CreateInstance(IUnknown * pUnknw, IUnknown * pUnkOuter, REFIID riid, void ** ppvObject)
2850 {
2851 HRESULT hr = S_OK;
2852
2853 if(pUnkOuter && riid != IID_IUnknown)
2855 else
2856 {
2857 CoClass * p = new CoClass(pUnknw, pUnkOuter);
2858
2859 if(p == NULL)
2860 hr = E_OUTOFMEMORY;
2861 else
2862 {
2863 hr = p->m_inner.QueryInterface(riid, ppvObject);
2864
2865 if(FAILED(hr))
2866 delete p;
2867 else
2868 p->m_inner.Release();
2869 }
2870 }
2871
2872 if(FAILED(hr))
2873 pUnknw->Release();
2874
2875 return hr;
2876 }
2877
2878 private:
2880 {
2881 if(m_IUnknown)
2882 m_IUnknown->Release();
2883
2884 if(m_IDispatch)
2885 m_IDispatch->Release();
2886
2887 if(m_IConnectionPointContainer)
2888 m_IConnectionPointContainer->Release();
2889
2890 if(m_IDataObject)
2891 m_IDataObject->Release();
2892
2893 if(m_IObjectSafety)
2894 m_IObjectSafety->Release();
2895
2896 if(m_IOleControl)
2897 m_IOleControl->Release();
2898
2899 if(m_IOleInPlaceActiveObject)
2900 m_IOleInPlaceActiveObject->Release();
2901
2902 if(m_IOleInPlaceObject)
2903 m_IOleInPlaceObject->Release();
2904
2905 if(m_IOleObject)
2906 m_IOleObject->Release();
2907
2908 if(m_IOleWindow)
2909 m_IOleWindow->Release();
2910
2911 if(m_IPersist)
2912 m_IPersist->Release();
2913
2914 if(m_IPersistPropertyBag)
2915 m_IPersistPropertyBag->Release();
2916
2917 if(m_IPersistStorage)
2918 m_IPersistStorage->Release();
2919
2920 if(m_IPersistStreamInit)
2921 m_IPersistStreamInit->Release();
2922
2923 if(m_IProvideClassInfo)
2924 m_IProvideClassInfo->Release();
2925
2926 if(m_IProvideClassInfo2)
2927 m_IProvideClassInfo2->Release();
2928
2929 if(m_IQuickActivate)
2930 m_IQuickActivate->Release();
2931
2932 if(m_ISpecifyPropertyPages)
2933 m_ISpecifyPropertyPages->Release();
2934
2935 if(m_IViewObject)
2936 m_IViewObject->Release();
2937
2938 if(m_IViewObject2)
2939 m_IViewObject2->Release();
2940
2941 if(m_IMsRdpClient)
2942 m_IMsRdpClient->Release();
2943
2944 if(m_IMsRdpClient2)
2945 m_IMsRdpClient2->Release();
2946
2947 if(m_IMsRdpClient3)
2948 m_IMsRdpClient3->Release();
2949
2950 if(m_IMsRdpClient4)
2951 m_IMsRdpClient4->Release();
2952
2953 if(m_IMsTscAx)
2954 m_IMsTscAx->Release();
2955
2956 if(m_IMsTscNonScriptable)
2957 m_IMsTscNonScriptable->Release();
2958
2959 if(m_IMsRdpClientNonScriptable)
2960 m_IMsRdpClientNonScriptable->Release();
2961
2962 if(m_IMsRdpClientNonScriptable2)
2963 m_IMsRdpClientNonScriptable2->Release();
2964 }
2965
2966 /* IUnknown */
2967 public:
2969 {
2970 return m_outer->QueryInterface(riid, ppvObject);
2971 }
2972
2974 {
2975 return m_outer->AddRef();
2976 }
2977
2979 {
2980 return m_outer->Release();
2981 }
2982
2983 /* IDispatch */
2984 private:
2985 static void FreeExcepInfo(const EXCEPINFO& excepInfo)
2986 {
2987 if(excepInfo.bstrSource)
2988 SysFreeString(excepInfo.bstrSource);
2989
2990 if(excepInfo.bstrDescription)
2991 SysFreeString(excepInfo.bstrDescription);
2992
2993 if(excepInfo.bstrHelpFile)
2994 SysFreeString(excepInfo.bstrHelpFile);
2995 }
2996
2997 static std::basic_string<TCHAR> ExcepInfoToString(const EXCEPINFO& excepInfo)
2998 {
2999 std::basic_ostringstream<TCHAR> o;
3000
3001 o << "{";
3002 o << " code: " << excepInfo.wCode << " from: " << std::basic_string<OLECHAR>(excepInfo.bstrSource, excepInfo.bstrSource + SysStringLen(excepInfo.bstrSource));
3003
3004 BSTR bstrDescription = NULL;
3005
3006 if(excepInfo.bstrDescription)
3007 bstrDescription = excepInfo.bstrDescription;
3008 else if(excepInfo.pfnDeferredFillIn)
3009 {
3010 EXCEPINFO excepInfoCopy = excepInfo;
3011
3012 if(SUCCEEDED(excepInfoCopy.pfnDeferredFillIn(&excepInfoCopy)) && excepInfoCopy.bstrDescription)
3013 {
3014 bstrDescription = excepInfoCopy.bstrDescription;
3015 excepInfoCopy.bstrDescription = NULL;
3016 }
3017
3018 if(excepInfoCopy.bstrSource == excepInfo.bstrSource)
3019 excepInfoCopy.bstrSource = NULL;
3020
3021 if(excepInfoCopy.bstrHelpFile == excepInfo.bstrDescription)
3022 excepInfoCopy.bstrDescription = NULL;
3023
3024 FreeExcepInfo(excepInfoCopy);
3025 }
3026
3027 if(bstrDescription)
3028 {
3029 o << " msg: " << std::basic_string<OLECHAR>(bstrDescription, bstrDescription + SysStringLen(bstrDescription));
3030
3031 if(excepInfo.bstrDescription == NULL)
3032 SysFreeString(bstrDescription);
3033 }
3034
3035 o << " }";
3036
3037 return o.str().c_str();
3038 }
3039
3040 public:
3042 {
3043 IDispatch * pIDispatch = getIDispatch();
3044 dbgprintf(TEXT("IDispatch::GetTypeInfoCount(%p)"), pctinfo);
3045 HRESULT hr = pIDispatch->GetTypeInfoCount(pctinfo);
3046 dbgprintf(TEXT("IDispatch::GetTypeInfoCount -> %08X, ctinfo = %lu"), hr, *pctinfo);
3047 return hr;
3048 }
3049
3050 virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo ** ppTInfo)
3051 {
3052 IDispatch * pIDispatch = getIDispatch();
3053 dbgprintf(TEXT("IDispatch::GetTypeInfo(%lu, %08X, %p)"), iTInfo, lcid, ppTInfo);
3054 HRESULT hr = pIDispatch->GetTypeInfo(iTInfo, lcid, ppTInfo);
3055 dbgprintf(TEXT("IDispatch::GetTypeInfo -> %08X, pTInfo = %p"), hr, *ppTInfo);
3056 return hr;
3057 }
3058
3059 virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId)
3060 {
3061 IDispatch * pIDispatch = getIDispatch();
3062 std::wstring strtemp;
3063
3064 std::wostringstream strtempo;
3065
3066 strtemp.resize(0);
3067 strtemp += L"[ ";
3068
3069 for(UINT i = 0; i < cNames; ++ i)
3070 {
3071 if(i)
3072 strtemp += L", ";
3073
3074 strtemp += rgszNames[i];
3075 }
3076
3077 strtemp += L" ]";
3078
3079 dbgprintf(TEXT("IDispatch::GetIDsOfNames(%ls, %ls, %lu, %08X, %p)"), UUIDToString(riid).c_str(), strtemp.c_str(), cNames, lcid, rgDispId);
3080 HRESULT hr = pIDispatch->GetIDsOfNames(riid, rgszNames, cNames, lcid, rgDispId);
3081
3082 strtemp.resize(0);
3083 strtempo.str(strtemp);
3084
3085 strtempo << L"[ ";
3086
3087 for(UINT i = 0; i < cNames; ++ i)
3088 {
3089 if(i)
3090 strtempo << L", ";
3091
3092 strtempo << rgDispId[i];
3093 }
3094
3095 strtempo << L" ]";
3096
3097 dbgprintf(TEXT("IDispatch::GetIDsOfNames -> %08X, rgDispId = %ls"), hr, strtempo.str().c_str());
3098
3099 return hr;
3100 }
3101
3102 virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult, EXCEPINFO * pExcepInfo, UINT * puArgErr)
3103 {
3104 IDispatch * pIDispatch = getIDispatch();
3105
3106 std::basic_ostringstream<TCHAR> strtempo;
3107
3108 strtempo << L"{";
3109
3110 for(unsigned int i = pDispParams->cArgs, j = pDispParams->cNamedArgs; j < pDispParams->cArgs; -- i, ++ j)
3111 {
3112 strtempo << L" ";
3113 strtempo << VariantToString(pDispParams->rgvarg[i - 1]);
3114 strtempo << L",";
3115 }
3116
3117 for(unsigned int i = pDispParams->cArgs - pDispParams->cNamedArgs; i > 0; -- i)
3118 {
3119 strtempo << L" ";
3120 strtempo << L"["; strtempo << pDispParams->rgdispidNamedArgs[i - 1]; strtempo << L"] => ";
3121 strtempo << VariantToString(pDispParams->rgvarg[i - 1]);
3122 strtempo << L",";
3123 }
3124
3125 strtempo << L" }";
3126
3127 dbgprintf(TEXT("IDispatch::Invoke(%ld, %ls, %08X, %04X, %s, %p, %p, %p)"), dispIdMember, UUIDToString(riid).c_str(), lcid, wFlags, strtempo.str().c_str(), pVarResult, pExcepInfo, puArgErr);
3128
3129 VARIANT VarResult = { };
3130 EXCEPINFO ExcepInfo = { };
3131
3132 if(pVarResult == NULL)
3133 pVarResult = &VarResult;
3134
3135 if(pExcepInfo == NULL)
3136 pExcepInfo = &ExcepInfo;
3137
3138 HRESULT hr = pIDispatch->Invoke(dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
3139
3140 dbgprintf(TEXT("IDispatch::Invoke -> %08X, returns %s, throws %s"), hr, VariantToString(*pVarResult).c_str(), ExcepInfoToString(*pExcepInfo).c_str());
3141
3142 FreeExcepInfo(ExcepInfo);
3143
3144 return hr;
3145 }
3146
3147 /* IConnectionPointContainer */
3148 public:
3150 {
3151 IConnectionPointContainer * pIConnectionPointContainer = getIConnectionPointContainer();
3152 dbgprintf(TEXT("IConnectionPointContainer::EnumConnectionPoints(%p)"), ppEnum);
3153 HRESULT hr = pIConnectionPointContainer->EnumConnectionPoints(ppEnum);
3154 dbgprintf(TEXT("IConnectionPointContainer::EnumConnectionPoints -> %08X, pEnum = %p"), hr, *ppEnum);
3155
3156 if(SUCCEEDED(hr))
3157 *ppEnum = HookIEnumConnectionPoints(*ppEnum);
3158
3159 return hr;
3160 }
3161
3163 {
3164 IConnectionPointContainer * pIConnectionPointContainer = getIConnectionPointContainer();
3165 dbgprintf(TEXT("IConnectionPointContainer::FindConnectionPoint(%ls, %p)"), UUIDToString(riid).c_str(), ppCP);
3166 HRESULT hr = pIConnectionPointContainer->FindConnectionPoint(riid, ppCP);
3167 dbgprintf(TEXT("IConnectionPointContainer::FindConnectionPoint -> %08X, pCP = %p"), hr, *ppCP);
3168
3169 if(SUCCEEDED(hr))
3170 *ppCP = HookIConnectionPoint(*ppCP);
3171
3172 return hr;
3173 }
3174
3175 /* IDataObject */
3176 private:
3177 static std::basic_string<TCHAR> TargetDeviceToString(const DVTARGETDEVICE& targetdev)
3178 {
3179 if(&targetdev == NULL)
3180 return TEXT("<null>");
3181
3182 std::basic_ostringstream<TCHAR> o;
3183
3184 o << "{";
3185 o << LPCWSTR(targetdev.tdData[targetdev.tdDriverNameOffset]);
3186
3187 if(targetdev.tdDeviceNameOffset)
3188 {
3189 o << ",";
3190 o << LPCWSTR(targetdev.tdData[targetdev.tdDeviceNameOffset]);
3191 }
3192
3193 if(targetdev.tdPortNameOffset)
3194 {
3195 o << ",";
3196 o << LPCWSTR(targetdev.tdData[targetdev.tdPortNameOffset]);
3197 }
3198
3199 o << " }";
3200
3201 return o.str();
3202 }
3203
3205 {
3206 switch(aspect)
3207 {
3208 case DVASPECT_CONTENT: return TEXT("content");
3209 case DVASPECT_THUMBNAIL: return TEXT("thumbnail");
3210 case DVASPECT_ICON: return TEXT("icon");
3211 case DVASPECT_DOCPRINT: return TEXT("printable");
3212 default: return TEXT("<unknown>");
3213 }
3214 }
3215
3217 {
3218 switch(tymed)
3219 {
3220 case TYMED_HGLOBAL: return TEXT("memory");
3221 case TYMED_FILE: return TEXT("file");
3222 case TYMED_ISTREAM: return TEXT("IStream");
3223 case TYMED_ISTORAGE: return TEXT("IStorage");
3224 case TYMED_GDI: return TEXT("bitmap");
3225 case TYMED_MFPICT: return TEXT("metafile");
3226 case TYMED_ENHMF: return TEXT("enhanced metafile");
3227 case TYMED_NULL: return TEXT("<no data>");
3228 default: return TEXT("<unknown>");
3229 }
3230 }
3231
3232 static std::basic_string<TCHAR> FormatEtcToString(const FORMATETC& formatetc)
3233 {
3234 std::basic_ostringstream<TCHAR> o;
3235
3236 o << "{";
3237
3238 // cfFormat
3239 o << " format: ";
3240
3241 switch(formatetc.cfFormat)
3242 {
3243 case CF_TEXT: o << "ANSI text"; break;
3244 case CF_BITMAP: o << "bitmap"; break;
3245 case CF_METAFILEPICT: o << "metafile"; break;
3246 case CF_SYLK: o << "symlink"; break;
3247 case CF_DIF: o << "DIF"; break;
3248 case CF_TIFF: o << "TIFF"; break;
3249 case CF_OEMTEXT: o << "OEM text"; break;
3250 case CF_DIB: o << "DIBv4"; break;
3251 case CF_PALETTE: o << "palette"; break;
3252 case CF_PENDATA: o << "pen data"; break;
3253 case CF_RIFF: o << "RIFF"; break;
3254 case CF_WAVE: o << "WAV"; break;
3255 case CF_UNICODETEXT: o << "Unicode text"; break;
3256 case CF_ENHMETAFILE: o << "enhanced metafile"; break;
3257 case CF_HDROP: o << "list of files"; break;
3258 case CF_LOCALE: o << "LCID"; break;
3259 case CF_DIBV5: o << "DIBv5"; break;
3260 case CF_OWNERDISPLAY: o << "<owner displayed>"; break;
3261 case CF_DSPTEXT: o << "<display text>"; break;
3262 case CF_DSPBITMAP: o << "<display bitmap>"; break;
3263 case CF_DSPMETAFILEPICT: o << "<display metafile>"; break;
3264 case CF_DSPENHMETAFILE: o << "<display enhanced metafile>"; break;
3265
3266 default:
3267 o << "<";
3268
3269 if(formatetc.cfFormat >= CF_PRIVATEFIRST && formatetc.cfFormat <= CF_PRIVATELAST)
3270 o << "private";
3271 else if(formatetc.cfFormat >= CF_GDIOBJFIRST && formatetc.cfFormat <= CF_GDIOBJLAST)
3272 o << "GDI object";
3273 else
3274 o << "unknown";
3275
3276 o << " " << std::hex << formatetc.cfFormat << std::dec << ">";
3277 }
3278
3279 // ptd
3280 if(formatetc.ptd)
3281 o << " device: " << TargetDeviceToString(*formatetc.ptd);
3282
3283 // dwAspect
3284 o << " aspect: " << AspectToString(formatetc.dwAspect);
3285
3286 // lindex
3287 if(formatetc.dwAspect == DVASPECT_CONTENT || formatetc.dwAspect == DVASPECT_DOCPRINT)
3288 o << " page split: " << formatetc.lindex;
3289
3290 // tymed
3291 o << " medium: " << TymedToString(formatetc.tymed);
3292
3293 return o.str();
3294 }
3295
3296 static std::basic_string<TCHAR> MediumToString(const STGMEDIUM& medium)
3297 {
3298 std::basic_ostringstream<TCHAR> o;
3299
3300 o << "{ ";
3301 o << TymedToString(medium.tymed);
3302 o << " }";
3303
3304 return o.str();
3305 }
3306
3307 public:
3308 virtual HRESULT STDMETHODCALLTYPE GetData(FORMATETC * pformatetcIn, STGMEDIUM * pmedium)
3309 {
3310 IDataObject * pIDataObject = getIDataObject();
3311 dbgprintf(TEXT("IDataObject::GetData(%s, %p)"), FormatEtcToString(*pformatetcIn).c_str(), pmedium);
3312 HRESULT hr = pIDataObject->GetData(pformatetcIn, pmedium);
3313 dbgprintf(TEXT("IDataObject::GetData -> %08X, %s"), hr, MediumToString(*pmedium).c_str());
3314 return hr;
3315 }
3316
3317 virtual HRESULT STDMETHODCALLTYPE GetDataHere(FORMATETC * pformatetc, STGMEDIUM * pmedium)
3318 {
3319 IDataObject * pIDataObject = getIDataObject();
3320 dbgprintf(TEXT("IDataObject::GetDataHere(%s, %p)"), FormatEtcToString(*pformatetc).c_str(), pmedium);
3321 HRESULT hr = pIDataObject->GetDataHere(pformatetc, pmedium);
3322 dbgprintf(TEXT("IDataObject::GetDataHere -> %08X, medium = %s"), hr, MediumToString(*pmedium).c_str());
3323 return hr;
3324 }
3325
3326 virtual HRESULT STDMETHODCALLTYPE QueryGetData(FORMATETC * pformatetc)
3327 {
3328 IDataObject * pIDataObject = getIDataObject();
3329 dbgprintf(TEXT("IDataObject::QueryGetData(%s)"), FormatEtcToString(*pformatetc).c_str());
3330 HRESULT hr = pIDataObject->QueryGetData(pformatetc);
3331 dbgprintf(TEXT("IDataObject::QueryGetData -> %08X"), hr);
3332 return hr;
3333 }
3334
3335 virtual HRESULT STDMETHODCALLTYPE GetCanonicalFormatEtc(FORMATETC * pformatectIn, FORMATETC * pformatetcOut)
3336 {
3337 IDataObject * pIDataObject = getIDataObject();
3338 dbgprintf(TEXT("IDataObject::GetCanonicalFormatEtc(%s, %p)"), FormatEtcToString(*pformatectIn).c_str(), pformatetcOut);
3339 HRESULT hr = pIDataObject->GetCanonicalFormatEtc(pformatectIn, pformatetcOut);
3340 dbgprintf(TEXT("IDataObject::GetCanonicalFormatEtc -> %08X, formatetcOut = %s"), hr, FormatEtcToString(*pformatetcOut).c_str());
3341 return hr;
3342 }
3343
3344 virtual HRESULT STDMETHODCALLTYPE SetData(FORMATETC * pformatetc, STGMEDIUM * pmedium, BOOL fRelease)
3345 {
3346 IDataObject * pIDataObject = getIDataObject();
3347 dbgprintf(TEXT("IDataObject::SetData(%s, %p, %s)"), FormatEtcToString(*pformatetc).c_str(), MediumToString(*pmedium).c_str(), fRelease ? TEXT("true") : TEXT("false"));
3348 HRESULT hr = pIDataObject->SetData(pformatetc, pmedium, fRelease);
3349 dbgprintf(TEXT("IDataObject::SetData -> %08X"), hr);
3350 return hr;
3351 }
3352
3353 virtual HRESULT STDMETHODCALLTYPE EnumFormatEtc(DWORD dwDirection, IEnumFORMATETC ** ppenumFormatEtc)
3354 {
3355 IDataObject * pIDataObject = getIDataObject();
3356 dbgprintf(TEXT("IDataObject::EnumFormatEtc(%lu, %p)"), dwDirection, ppenumFormatEtc);
3357 HRESULT hr = pIDataObject->EnumFormatEtc(dwDirection, ppenumFormatEtc);
3358 dbgprintf(TEXT("IDataObject::EnumFormatEtc -> %08X, penumFormatEtc = %p"), hr, *ppenumFormatEtc);
3359 // TODO: hook
3360 return hr;
3361 }
3362
3363 virtual HRESULT STDMETHODCALLTYPE DAdvise(FORMATETC * pformatetc, DWORD advf, IAdviseSink * pAdvSink, DWORD * pdwConnection)
3364 {
3365 IDataObject * pIDataObject = getIDataObject();
3366 dbgprintf(TEXT("IDataObject::DAdvise(%s, %lu, %p, %p)"), FormatEtcToString(*pformatetc).c_str(), advf, pAdvSink, pdwConnection);
3367 HRESULT hr = pIDataObject->DAdvise(pformatetc, advf, pAdvSink, pdwConnection);
3368 dbgprintf(TEXT("IDataObject::DAdvise -> %08X, dwConnection = %lu"), hr, *pdwConnection);
3369 // TODO: hook
3370 return hr;
3371 }
3372
3374 {
3375 IDataObject * pIDataObject = getIDataObject();
3376 dbgprintf(TEXT("IDataObject::DUnadvise(%lu)"), dwConnection);
3377 HRESULT hr = pIDataObject->DUnadvise(dwConnection);
3378 dbgprintf(TEXT("IDataObject::DUnadvise -> %08X"), hr);
3379 return hr;
3380 }
3381
3383 {
3384 IDataObject * pIDataObject = getIDataObject();
3385 dbgprintf(TEXT("IDataObject::EnumDAdvise(%p)"), ppenumAdvise);
3386 HRESULT hr = pIDataObject->EnumDAdvise(ppenumAdvise);
3387 dbgprintf(TEXT("IDataObject::EnumDAdvise -> %08X, penumAdvise = %p"), hr, *ppenumAdvise);
3388 // TODO: hook
3389 return hr;
3390 }
3391
3392 /* IObjectSafety */
3393 public:
3394 virtual HRESULT STDMETHODCALLTYPE IObjectSafety::GetInterfaceSafetyOptions(REFIID riid, DWORD * pdwSupportedOptions, DWORD * pdwEnabledOptions)
3395 {
3396 IObjectSafety * pIObjectSafety = getIObjectSafety();
3397 dbgprintf(TEXT("IObjectSafety::GetInterfaceSafetyOptions(%ls, %p, %p)"), UUIDToString(riid).c_str(), pdwSupportedOptions, pdwEnabledOptions);
3398 HRESULT hr = pIObjectSafety->GetInterfaceSafetyOptions(riid, pdwSupportedOptions, pdwEnabledOptions);
3399 dbgprintf(TEXT("IObjectSafety::GetInterfaceSafetyOptions -> %08X, dwSupportedOptions = %08X, dwEnabledOptions = %08X"), hr, *pdwSupportedOptions, *pdwEnabledOptions);
3400 return hr;
3401 }
3402
3404 {
3405 IObjectSafety * pIObjectSafety = getIObjectSafety();
3406 dbgprintf(TEXT("IObjectSafety::SetInterfaceSafetyOptions(%ls, %08X, %08X)"), UUIDToString(riid).c_str(), dwOptionSetMask, dwEnabledOptions);
3407 HRESULT hr = pIObjectSafety->SetInterfaceSafetyOptions(riid, dwOptionSetMask, dwEnabledOptions);
3408 dbgprintf(TEXT("IObjectSafety::SetInterfaceSafetyOptions -> %08X"), hr);
3409 return hr;
3410 }
3411
3412 /* IOleControl */
3413 private:
3414 std::basic_string<TCHAR> ControlInfoToString(const CONTROLINFO& ci)
3415 {
3416 std::basic_ostringstream<TCHAR> o;
3417
3418 int firstdone = 0;
3419
3420 o << "{ ";
3421
3422 if(ci.cAccel && ci.hAccel)
3423 {
3424 LPACCEL pAccel = static_cast<LPACCEL>(GlobalLock(ci.hAccel));
3425
3426 if(pAccel)
3427 {
3428 for(USHORT i = 0; i < ci.cAccel; ++ i)
3429 {
3430 if(i)
3431 o << ", ";
3432
3433 if(pAccel[i].fVirt & FSHIFT)
3434 o << "SHIFT + ";
3435
3436 if(pAccel[i].fVirt & FCONTROL)
3437 o << "CONTROL + ";
3438
3439 if(pAccel[i].fVirt & FALT)
3440 o << "ALT + ";
3441
3442 if(pAccel[i].fVirt & FVIRTKEY)
3443 o << "<vkey:" << std::hex << pAccel[i].key << std::dec << ">";
3444 else
3445 o << wchar_t(pAccel[i].key);
3446
3447 o << " " << std::hex << pAccel[i].cmd << std::dec;
3448 }
3449
3450 firstdone = ci.cAccel;
3451
3452 GlobalUnlock(pAccel);
3453 }
3454 }
3455
3456 if(ci.dwFlags & CTRLINFO_EATS_RETURN)
3457 {
3458 if(!firstdone)
3459 {
3460 o << ", ";
3461 ++ firstdone;
3462 }
3463
3464 o << "ENTER";
3465 }
3466
3467 if(ci.dwFlags & CTRLINFO_EATS_ESCAPE)
3468 {
3469 if(!firstdone)
3470 {
3471 o << ", ";
3472 ++ firstdone;
3473 }
3474
3475 o << "ESC";
3476 }
3477
3478 if(firstdone)
3479 o << " ";
3480
3481 o << "}";
3482
3483 return o.str();
3484 }
3485
3486 std::basic_string<TCHAR> MnemonicToString(const MSG& msg)
3487 {
3488 std::basic_ostringstream<TCHAR> o;
3489
3490 o << "[";
3491
3492 switch(msg.message)
3493 {
3494 case WM_SYSKEYDOWN:
3495 o << "ALT + ";
3496
3497 case WM_KEYDOWN:
3498 TCHAR sz[1024];
3499 GetKeyNameText(LONG(msg.lParam), sz, ARRAYSIZE(sz));
3500 o << sz;
3501
3502 default:
3503 o << "<unknown message " << std::hex << msg.message << std::dec << ">";
3504 }
3505
3506 o << "]";
3507
3508 return o.str();
3509 }
3510
3511 public:
3513 {
3514 IOleControl * pIOleControl = getIOleControl();
3515 dbgprintf(TEXT("IOleControl::GetControlInfo(%p)"), pCI);
3516 HRESULT hr = pIOleControl->GetControlInfo(pCI);
3517 dbgprintf(TEXT("IOleControl::GetControlInfo -> %08X, %s"), hr, ControlInfoToString(*pCI).c_str());
3518 return hr;
3519 }
3520
3522 {
3523 IOleControl * pIOleControl = getIOleControl();
3524 dbgprintf(TEXT("IOleControl::OnMnemonic(%s)"), MnemonicToString(*pMsg).c_str());
3525 HRESULT hr = pIOleControl->OnMnemonic(pMsg);
3526 dbgprintf(TEXT("IOleControl::OnMnemonic -> %08X"), hr);
3527 return hr;
3528 }
3529
3531 {
3532 IOleControl * pIOleControl = getIOleControl();
3533 dbgprintf(TEXT("IOleControl::OnAmbientPropertyChange(%08X)"), dispID);
3534 HRESULT hr = pIOleControl->OnAmbientPropertyChange(dispID);
3535 dbgprintf(TEXT("IOleControl::OnAmbientPropertyChange -> %08X"), hr);
3536 return hr;
3537 }
3538
3540 {
3541 IOleControl * pIOleControl = getIOleControl();
3542 dbgprintf(TEXT("IOleControl::FreezeEvents(%s)"), BooleanToString(bFreeze));
3543 HRESULT hr = pIOleControl->FreezeEvents(bFreeze);
3544 dbgprintf(TEXT("IOleControl::FreezeEvents -> %08X"), hr);
3545 return hr;
3546 }
3547
3548 /* IOleInPlaceActiveObject */
3549 public:
3551 {
3552 IOleInPlaceActiveObject * pIOleInPlaceActiveObject = getIOleInPlaceActiveObject();
3553 dbgprintf(TEXT("IOleInPlaceActiveObject::TranslateAccelerator(%s)"), MnemonicToString(*lpmsg).c_str());
3554 HRESULT hr = pIOleInPlaceActiveObject->TranslateAccelerator(lpmsg);
3555 dbgprintf(TEXT("IOleInPlaceActiveObject::TranslateAccelerator -> %08X"), hr);
3556 return hr;
3557 }
3558
3560 {
3561 IOleInPlaceActiveObject * pIOleInPlaceActiveObject = getIOleInPlaceActiveObject();
3562 dbgprintf(TEXT("IOleInPlaceActiveObject::OnFrameWindowActivate(%s)"), BooleanToString(fActivate));
3563 HRESULT hr = pIOleInPlaceActiveObject->OnFrameWindowActivate(fActivate);
3564 dbgprintf(TEXT("IOleInPlaceActiveObject::OnFrameWindowActivate -> %08X"), hr);
3565 return hr;
3566 }
3567
3569 {
3570 IOleInPlaceActiveObject * pIOleInPlaceActiveObject = getIOleInPlaceActiveObject();
3571 dbgprintf(TEXT("IOleInPlaceActiveObject::OnDocWindowActivate(%s)"), BooleanToString(fActivate));
3572 HRESULT hr = pIOleInPlaceActiveObject->OnDocWindowActivate(fActivate);
3573 dbgprintf(TEXT("IOleInPlaceActiveObject::OnDocWindowActivate -> %08X"), hr);
3574 return hr;
3575 }
3576
3577 virtual HRESULT STDMETHODCALLTYPE ResizeBorder(LPCRECT prcBorder, IOleInPlaceUIWindow * pUIWindow, BOOL fFrameWindow)
3578 {
3579 // TODO: hook pUIWindow
3580 IOleInPlaceActiveObject * pIOleInPlaceActiveObject = getIOleInPlaceActiveObject();
3581 dbgprintf(TEXT("IOleInPlaceActiveObject::ResizeBorder(%s)"), RectToString(*prcBorder).c_str(), pUIWindow, BooleanToString(fFrameWindow));
3582 HRESULT hr = pIOleInPlaceActiveObject->ResizeBorder(prcBorder, pUIWindow, fFrameWindow);
3583 dbgprintf(TEXT("IOleInPlaceActiveObject::ResizeBorder -> %08X"), hr);
3584 return hr;
3585 }
3586
3588 {
3589 IOleInPlaceActiveObject * pIOleInPlaceActiveObject = getIOleInPlaceActiveObject();
3590 dbgprintf(TEXT("IOleInPlaceActiveObject::EnableModeless(%s)"), BooleanToString(fEnable));
3591 HRESULT hr = pIOleInPlaceActiveObject->EnableModeless(fEnable);
3592 dbgprintf(TEXT("IOleInPlaceActiveObject::EnableModeless -> %08X"), hr);
3593 return hr;
3594 }
3595
3596 /* IOleInPlaceObject */
3597 public:
3599 {
3600 IOleInPlaceObject * pIOleInPlaceObject = getIOleInPlaceObject();
3601 dbgprintf(TEXT("IOleInPlaceObject::InPlaceDeactivate()"));
3602 HRESULT hr = pIOleInPlaceObject->InPlaceDeactivate();
3603 dbgprintf(TEXT("IOleInPlaceObject::InPlaceDeactivate -> %08X"), hr);
3604 return hr;
3605 }
3606
3608 {
3609 IOleInPlaceObject * pIOleInPlaceObject = getIOleInPlaceObject();
3610 dbgprintf(TEXT("IOleInPlaceObject::UIDeactivate()"));
3611 HRESULT hr = pIOleInPlaceObject->UIDeactivate();
3612 dbgprintf(TEXT("IOleInPlaceObject::UIDeactivate -> %08X"), hr);
3613 return hr;
3614 }
3615
3616 virtual HRESULT STDMETHODCALLTYPE SetObjectRects(LPCRECT lprcPosRect, LPCRECT lprcClipRect)
3617 {
3618 IOleInPlaceObject * pIOleInPlaceObject = getIOleInPlaceObject();
3619 dbgprintf(TEXT("IOleInPlaceObject::SetObjectRects(%s, %s)"), RectToString(*lprcPosRect).c_str(), RectToString(*lprcClipRect).c_str());
3620 HRESULT hr = pIOleInPlaceObject->SetObjectRects(lprcPosRect, lprcClipRect);
3621 dbgprintf(TEXT("IOleInPlaceObject::SetObjectRects -> %08X"), hr);
3622 return hr;
3623 }
3624
3626 {
3627 IOleInPlaceObject * pIOleInPlaceObject = getIOleInPlaceObject();
3628 dbgprintf(TEXT("IOleInPlaceObject::ReactivateAndUndo()"));
3629 HRESULT hr = pIOleInPlaceObject->ReactivateAndUndo();
3630 dbgprintf(TEXT("IOleInPlaceObject::ReactivateAndUndo -> %08X"), hr);
3631 return hr;
3632 }
3633
3634 /* IOleWindow */
3635 public:
3637 {
3638 IOleWindow * pIOleWindow = getIOleWindow();
3639 dbgprintf(TEXT("IOleWindow::GetWindow(%p)"), phwnd);
3640 HRESULT hr = pIOleWindow->GetWindow(phwnd);
3641 dbgprintf(TEXT("IOleWindow::GetWindow -> %08X, hwnd = %X"), hr, *phwnd);
3642 return hr;
3643 }
3644
3646 {
3647 IOleWindow * pIOleWindow = getIOleWindow();
3648 dbgprintf(TEXT("IOleWindow::ContextSensitiveHelp(%s)"), BooleanToString(fEnterMode));
3649 HRESULT hr = pIOleWindow->ContextSensitiveHelp(fEnterMode);
3650 dbgprintf(TEXT("IOleWindow::ContextSensitiveHelp -> %08X"), hr);
3651 return hr;
3652 }
3653
3654 /* IOleObject */
3655 public:
3657 {
3658 // TODO: hook pClientSite
3659 IOleObject * pIOleObject = getIOleObject();
3660 dbgprintf(TEXT("IOleObject::SetClientSite(%p)"), pClientSite);
3661 HRESULT hr = pIOleObject->SetClientSite(pClientSite);
3662 dbgprintf(TEXT("IOleObject::SetClientSite -> %08X"), hr);
3663 return hr;
3664 }
3665
3667 {
3668 IOleObject * pIOleObject = getIOleObject();
3669 dbgprintf(TEXT("IOleObject::GetClientSite(%s)"), ppClientSite);
3670 HRESULT hr = pIOleObject->GetClientSite(ppClientSite);
3671 dbgprintf(TEXT("IOleObject::GetClientSite -> %08X"), hr, ppClientSite);
3672 return hr;
3673 }
3674
3675 virtual HRESULT STDMETHODCALLTYPE SetHostNames(LPCOLESTR szContainerApp, LPCOLESTR szContainerObj)
3676 {
3677 IOleObject * pIOleObject = getIOleObject();
3678 dbgprintf(TEXT("IOleObject::SetHostNames(%ls, %ls)"), szContainerApp, szContainerObj);
3679 HRESULT hr = pIOleObject->SetHostNames(szContainerApp, szContainerObj);
3680 dbgprintf(TEXT("IOleObject::SetHostNames -> %08X"), hr);
3681 return hr;
3682 }
3683
3684 virtual HRESULT STDMETHODCALLTYPE Close(DWORD dwSaveOption)
3685 {
3686 IOleObject * pIOleObject = getIOleObject();
3687 dbgprintf(TEXT("IOleObject::Close(%lu)"), dwSaveOption);
3688 HRESULT hr = pIOleObject->Close(dwSaveOption);
3689 dbgprintf(TEXT("IOleObject::Close -> %08X"), hr);
3690 return hr;
3691 }
3692
3693 virtual HRESULT STDMETHODCALLTYPE SetMoniker(DWORD dwWhichMoniker, IMoniker * pmk)
3694 {
3695 IOleObject * pIOleObject = getIOleObject();
3696 dbgprintf(TEXT("IOleObject::SetMoniker(%lu, %p)"), dwWhichMoniker, MonikerToString(pmk).c_str());
3697 HRESULT hr = pIOleObject->SetMoniker(dwWhichMoniker, pmk);
3698 dbgprintf(TEXT("IOleObject::SetMoniker -> %08X"), hr);
3699 return hr;
3700 }
3701
3702 virtual HRESULT STDMETHODCALLTYPE GetMoniker(DWORD dwAssign, DWORD dwWhichMoniker, IMoniker ** ppmk)
3703 {
3704 IOleObject * pIOleObject = getIOleObject();
3705 dbgprintf(TEXT("IOleObject::GetMoniker(%lu, %lu, %p)"), dwAssign, dwWhichMoniker, ppmk);
3706 HRESULT hr = pIOleObject->GetMoniker(dwAssign, dwWhichMoniker, ppmk);
3707 dbgprintf(TEXT("IOleObject::GetMoniker -> %08X, pmk = %s"), hr, SUCCEEDED(hr) ? MonikerToString(*ppmk).c_str() : TEXT("<null>"));
3708 return hr;
3709 }
3710
3712 {
3713 IOleObject * pIOleObject = getIOleObject();
3714 dbgprintf(TEXT("IOleObject::InitFromData(%p, %s, %lu)"), pDataObject, BooleanToString(fCreation), dwReserved);
3715 HRESULT hr = pIOleObject->InitFromData(pDataObject, fCreation, dwReserved);
3716 dbgprintf(TEXT("IOleObject::InitFromData -> %08X"), hr);
3717 return hr;
3718 }
3719
3721 {
3722 IOleObject * pIOleObject = getIOleObject();
3723 dbgprintf(TEXT("IOleObject::GetClipboardData(%lu, %p)"), dwReserved, ppDataObject);
3724 HRESULT hr = pIOleObject->GetClipboardData(dwReserved, ppDataObject);
3725 dbgprintf(TEXT("IOleObject::GetClipboardData -> %08X, pDataObject = %p"), hr, *ppDataObject);
3726 return hr;
3727 }
3728
3729 virtual HRESULT STDMETHODCALLTYPE DoVerb(LONG iVerb, LPMSG lpmsg, IOleClientSite * pActiveSite, LONG lindex, HWND hwndParent, LPCRECT lprcPosRect)
3730 {
3731 IOleObject * pIOleObject = getIOleObject();
3732 dbgprintf(TEXT("IOleObject::DoVerb(%ld, %p, %p, %ld, %p, %s)"), iVerb, lpmsg, pActiveSite, lindex, hwndParent, RectToString(*lprcPosRect).c_str());
3733 HRESULT hr = pIOleObject->DoVerb(iVerb, lpmsg, pActiveSite, lindex, hwndParent, lprcPosRect);
3734 dbgprintf(TEXT("IOleObject::DoVerb -> %08X"), hr);
3735 return hr;
3736 }
3737
3739 {
3740 IOleObject * pIOleObject = getIOleObject();
3741 dbgprintf(TEXT("IOleObject::EnumVerbs(%p)"), ppEnumOleVerb);
3742 HRESULT hr = pIOleObject->EnumVerbs(ppEnumOleVerb);
3743 dbgprintf(TEXT("IOleObject::EnumVerbs -> %08X, pEnumOleVerb = %p"), hr, *ppEnumOleVerb);
3744 // TODO: hook
3745 return hr;
3746 }
3747
3749 {
3750 IOleObject * pIOleObject = getIOleObject();
3751 dbgprintf(TEXT("IOleObject::Update(%s)"));
3752 HRESULT hr = pIOleObject->Update();
3753 dbgprintf(TEXT("IOleObject::Update -> %08X"), hr);
3754 return hr;
3755 }
3756
3758 {
3759 IOleObject * pIOleObject = getIOleObject();
3760 dbgprintf(TEXT("IOleObject::IsUpToDate(%s)"));
3761 HRESULT hr = pIOleObject->IsUpToDate();
3762 dbgprintf(TEXT("IOleObject::IsUpToDate -> %08X"), hr);
3763 return hr;
3764 }
3765
3767 {
3768 IOleObject * pIOleObject = getIOleObject();
3769 dbgprintf(TEXT("IOleObject::GetUserClassID(%p)"), pClsid);
3770 HRESULT hr = pIOleObject->GetUserClassID(pClsid);
3771 dbgprintf(TEXT("IOleObject::GetUserClassID -> %08X, Clsid = %ls"), hr, UUIDToString(*pClsid).c_str());
3772 return hr;
3773 }
3774
3775 virtual HRESULT STDMETHODCALLTYPE GetUserType(DWORD dwFormOfType, LPOLESTR * pszUserType)
3776 {
3777 IOleObject * pIOleObject = getIOleObject();
3778 dbgprintf(TEXT("IOleObject::GetUserType(%lu, %p)"), dwFormOfType, pszUserType);
3779 HRESULT hr = pIOleObject->GetUserType(dwFormOfType, pszUserType);
3780 dbgprintf(TEXT("IOleObject::GetUserType -> %08X, szUserType = %s"), hr, *pszUserType);
3781 return hr;
3782 }