Mobile API Reference  MicroStrategy 2019
Msi_atlbase.h
Go to the documentation of this file.
1 // File: atlbase.h
2 // Date: 10th July 2001
3 // Author: Will Hurwood
4 // Modified by: Liqun Jin
5 //
6 // Copyright (C) 2001 MicroStrategy Incorporated
7 // All rights reserved
8 
9 // This header file replaces the atlbase.h file from ATL on UNIX
10 // File declares similar symbols and classes to the corresponding VC++ file
11 
12 #ifndef __ATLBASE_H__
13 #define __ATLBASE_H__
14 
15 #ifndef _ATL_NO_PRAGMA_WARNINGS
16 #pragma warning(disable: 4355) // 'this' : used in base member initializer list
17 #endif
18 
19 #define NOT_IMP_ASSERTE _ASSERTE(false && L"Called a function that is not implemented in MSI COM")
20 
22 #include "MsiCOM/MsiCOM/MsiCOM.h"
23 #include "PDCHeader/PDCwindows.h"
24 #include "MsiCOM/MsiCOM/Msi_ole2.h"
27 #include "Base/Base/GUID.h"
28 
29 #include "PDCHeader/PDClimits.h"
30 
31 #ifdef WIN64
32 typedef unsigned __int64 DWORD_PTR;
33 #else
34 typedef unsigned long DWORD_PTR;
35 #endif
36 
37 #define CLSCTX_ALL 0
40 #include "Synch/Synch/AtomicLong.h"
41 
42 namespace ATL
43 {
45  // Provide a non threadsafe version of InterlockedIncrement and InterlockedDecrement
46  inline LONG InterlockedIncrement(MSynch::AtomicLong * p) { return ++(*p); }
47  inline LONG InterlockedDecrement(MSynch::AtomicLong * p) { return --(*p); }
48 // inline LONG InterlockedExchange(MSynch::AtomicLong * p, LONG Value) { (*p) = Value; return (*p);}
49 
51  // GUID comparison
52 
53  inline BOOL InlineIsEqualGUID(REFGUID rguid1, REFGUID rguid2)
54  {
55  return MBase::IsEqualGUID(rguid1, rguid2)?TRUE:FALSE;
56  }
57 
58  inline BOOL InlineIsGUIDNULL(REFGUID rguid1)
59  {
60  return MBase::IsGUIDNULL(rguid1)?TRUE:FALSE;
61  }
62 
63  inline long InlineCompareGUID(const GUID& irGUID1, const GUID& irGUID2)
64  {
65  return MBase::CompareGUID(irGUID1, irGUID2);
66  }
67 
69  {
70  return (
71  ((PLONG) &rguid1)[0] == 0 &&
72  ((PLONG) &rguid1)[1] == 0 &&
73 
74 #if defined(sun) || defined(_AIX) || defined(__hpux) // little-endian.
75  ((PLONG) &rguid1)[2] == 0xC0000000 &&
76  ((PLONG) &rguid1)[3] == 0x00000046);
77 #elif defined(WIN32) || defined(linux) // big-endian
78  ((PLONG) &rguid1)[2] == 0x000000C0 &&
79  ((PLONG) &rguid1)[3] == 0x46000000);
80 #else
81  ((PLONG) &rguid1)[2] == 0xC0000000 &&
82  ((PLONG) &rguid1)[3] == 0x00000046);
83 #endif
84  }
85 
86 
88  // QI Support
89 
90  typedef HRESULT (WINAPI _ATL_CREATORARGFUNC)(void* pv, REFIID riid, LPVOID* ppv, DWORD_PTR dw);
91  typedef HRESULT (WINAPI _ATL_CREATORFUNC)(void* pv, REFIID riid, LPVOID* ppv);
92 
94  {
95  const IID* piid; // the interface id (IID)
97  _ATL_CREATORARGFUNC* pFunc; //NULL:end, 1:offset, n:ptr
98  };
99 
100  // This is used in place of NULL when no function is available
101 #define _ATL_SIMPLEMAPENTRY ((_ATL_CREATORARGFUNC*)1)
102 
103  ATLAPI AtlInternalQueryInterface(void* pThis,
104  const _ATL_INTMAP_ENTRY* pEntries,
105  REFIID iid,
106  void** ppvObject);
107 
109  // Thread models
110 
111  // **** MicroStrategy modications begin here
112 
113  // Our objective is to replace CRITICAL_SECTION with MSICriticalSection
114  // We also need to add a constructor, to pass in the LockCategory
115  // We included the MSISynch headers earlier, outside the namespace
116 
117  // (MSI) All of the usages of critical sections in the
118  // (MSI) ATL library files seem to be CComAutoCriticalSection, so we are okay with this.
119  // (MSI) We do add a constructor to keep the three critical sections interchangable.
120  // (MSI) Since CComCriticalSection is not used, we make CComCriticalSection same as CComFakeCriticalSection.
122  {
123  public:
124  // (MSI) Add a fake constructor to the class
126  {
127  }
128 
129  void Lock()
130  {
131  }
132 
133  void Unlock()
134  {
135  }
136 
137  void Init()
138  {
139  }
140 
141  void Term()
142  {
143  }
144  };
145 
146  // (MSI) Change CComAutoCriticalSection so it uses the new critical section implementation
147  // Don't use in user code. Only used by ATL.
148  // This is a stack object, don't put on the heap
150  {
151  public:
152  // (MSI) Add a constructor to the class
154 
155  virtual ~CComAutoCriticalSection() throw();
156 
157  // (MSI) The Lock method is called Enter in the base class
158  void Exception_unsafe_Lock__which_should_NOT_be_used_because_of_imminent_deadlocks__Use_SmartLock_instead();
159 
160  // (MSI) The Unlock method is called Leave in the base class
161  void Exception_unsafe_Unlock__which_should_NOT_be_used_because_of_imminent_deadlocks__Use_SmartLock_instead();
162 
163  void SetLockCategory(MSynch::EnumDSSLockStackCategory iLockCat);
164 
165  // (MSI) Do nothing - MSICriticalSection is initialized on construction
166  void Init();
167 
168  // (MSI) Do nothing - MSICriticalSection is deleted on destruction
169  void Term();
170 
171  void Delete() throw();
172 
173  protected:
174  void Lock();
175 
176  void Unlock();
177 
178  private:
179  MSynch::CriticalSectionPtr mCriticalSectionPtr;
180  };
181 
182  // (MSI) Added the constructor, so we don't get errors when we try to pass
183  // (MSI) off a fake critical section as a real one
185  {
186  public:
187  // (MSI) Add a fake constructor to the class
189  {
190  }
191 
192  /*
193  void Lock();
194  void Unlock();
195  void Init();
196  void Term();
197  */
198  void Lock()
199  {
200  }
201 
202  void Unlock()
203  {
204  }
205 
206  void Init()
207  {
208  }
209 
210  void Term()
211  {
212  }
213 
215  {
216  }
217 
218  // (MSI) The Unlock method is called Leave in the base class
220  {
221  }
222 
223  };
224 
226  {
227  public:
229  {
230  return ++(*p);
231  }
232 
234  {
235  return --(*p);
236  }
237 
241  };
242 
243 
244  // BEWARE - We should not be using CComFakeCriticalSection for these
245  // BEWARE - critical sections. We expect to revisit critical sections at
246  // BEWARe - a later point.
248  {
249  public:
251  {
252  return ++(*p);
253  }
254 
256  {
257  return --(*p);
258  }
259 
263  };
264 
266  {
267  public:
269  {
270  return ++(*p);
271  }
272 
274  {
275  return --(*p);
276  }
277 
281  };
282 
283  // We are only interested in free threaded environment
286 
287 
289  // Object map
290 
291  // Structure used to record information about a co-class in an object
292  // This structure is simpler than the one used in VC++'s ATL
294  {
295  const CLSID* pclsid;
296  _ATL_CREATORFUNC* pfnGetClassObject;
297  _ATL_CREATORFUNC* pfnCreateInstance;
299  };
300 
301  // Base class for a module
302  struct _ATL_MODULE
303  {
304  public:
305  UINT cbSize; // Used to detect the size of the module if it changes
307  };
308 
310  {
311  return pEntry+1;
312  }
313 
314 
316  // CComModule
317 
318  // Declaration for parts of the module implemented externally in the shared library
320  REFCLSID rclsid,
321  REFIID riid,
322  LPVOID* ppv);
323  ATLAPI AtlModuleInit(_ATL_MODULE* pM, _ATL_OBJMAP_ENTRY* p, HINSTANCE h);
325 
326  // The CComModule class is used in an inproc ATL DLL to keep track of the number
327  // of COM objects currently made by the DLL so we can determine if it is safe
328  // to unload the DLL. It is the singleton class whose functions are used to
329  // implement the standard entry points.
331  {
332  public:
334  HRESULT Init(_ATL_OBJMAP_ENTRY* p, HINSTANCE h, const GUID* plibid = NULL);
335  void Term();
336  LONG GetLockCount();
337  HRESULT RegisterServer(BOOL bRegTypeLib = FALSE, const CLSID* pCLSID = NULL);
338  HRESULT UnregisterServer(const CLSID* pCLSID = NULL);
339  HRESULT UnregisterServer(BOOL bUnRegTypeLib, const CLSID* pCLSID = NULL);
340 
341  // Support the GetClassObject function
342  HRESULT GetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv);
343 
344  // Lock method is intended to increment number of COM objects in module
345  // We do not need it, since we don't intend to unload library
346  LONG Lock();
347 
348  // Unlock method is intended to decrement number of COM objects in module
349  // We do not need it, since we don't intend to unload library
350  LONG Unlock();
351  };
352 
354  // CComPtr
355 
356  // Smart Pointer helpers
358  {
359  if (*pp)
360  (*pp)->Release();
361  *pp = lp;
362  if (*pp)
363  (*pp)->AddRef();
364  return *pp;
365  }
367 
368  // Connection Point Helpers
369  ATLAPI AtlAdvise(IUnknown* pUnkCP, IUnknown* pUnk, const IID& iid, LPDWORD pdw);
370  ATLAPI AtlUnadvise(IUnknown* pUnkCP, const IID& iid, DWORD dw);
371 
372  template <class T>
373  class _NoAddRefReleaseOnCComPtr : public T
374  {
375  private:
376  STDMETHOD_(ULONG, AddRef)()=0;
377  STDMETHOD_(ULONG, Release)()=0;
378  };
379 
380  template <class T>
381  class CComPtr
382  {
383  public:
384  typedef T _PtrClass;
386  {
387  p=NULL;
388  }
389  CComPtr(T* lp)
390  {
391  if ((p = lp) != NULL)
392  p->AddRef();
393  }
394  CComPtr(const CComPtr<T>& lp)
395  {
396  if ((p = lp.p) != NULL)
397  p->AddRef();
398  }
400  {
401  if (p)
402  p->Release();
403  }
404  void Release()
405  {
406  IUnknown* pTemp = p;
407  if (pTemp)
408  {
409  p = NULL;
410  pTemp->Release();
411  }
412  }
413  operator T*() const
414  {
415  return (T*)p;
416  }
417  T& operator*() const
418  {
419  ATLASSERT(p!=NULL);
420  return *p;
421  }
422  //The assert on operator& usually indicates a bug. If this is really
423  //what is needed, however, take the address of the p member explicitly.
424  T** operator&()
425  {
426  ATLASSERT(p==NULL);
427  return &p;
428  }
430  {
431  ATLASSERT(p!=NULL);
433  }
434  T* operator=(T* lp)
435  {
436  return (T*)AtlComPtrAssign((IUnknown**)&p, lp);
437  }
438  T* operator=(const CComPtr<T>& lp)
439  {
440  return (T*)AtlComPtrAssign((IUnknown**)&p, lp.p);
441  }
442  bool operator!() const
443  {
444  return (p == NULL);
445  }
446  bool operator<(T* pT) const
447  {
448  return p < pT;
449  }
450  bool operator==(T* pT) const
451  {
452  return p == pT;
453  }
454  // Compare two objects for equivalence
455  bool IsEqualObject(IUnknown* pOther)
456  {
457  if (p == NULL && pOther == NULL)
458  return true; // They are both NULL objects
459 
460  if (p == NULL || pOther == NULL)
461  return false; // One is NULL the other is not
462 
463  CComPtr<IUnknown> punk1;
464  CComPtr<IUnknown> punk2;
465  p->QueryInterface(IID_IUnknown, (void**)&punk1);
466  pOther->QueryInterface(IID_IUnknown, (void**)&punk2);
467  return punk1 == punk2;
468  }
469  void Attach(T* p2)
470  {
471  if (p)
472  p->Release();
473  p = p2;
474  }
475  T* Detach()
476  {
477  T* pt = p;
478  p = NULL;
479  return pt;
480  }
481  HRESULT CopyTo(T** ppT)
482  {
483  ATLASSERT(ppT != NULL);
484  if (ppT == NULL)
485  return E_POINTER;
486  *ppT = p;
487  if (p)
488  p->AddRef();
489  return S_OK;
490  }
491  HRESULT SetSite(IUnknown* punkParent)
492  {
493  // return AtlSetChildSite(p, punkParent);
494  //Since we do not use it, we need not implement it
496  return E_NOTIMPL;
497  }
498  HRESULT Advise(IUnknown* pUnk, const IID& iid, LPDWORD pdw)
499  {
500  return AtlAdvise(p, pUnk, iid, pdw);
501  }
502  // BEWARE: CLSCTX_ALL is defined to 0 which is a fake value. if want to use this method, you need to define CLSCTX_ALL
503  HRESULT CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter = NULL, DWORD dwClsContext = CLSCTX_ALL)
504  {
505  /*
506  ATLASSERT(p == NULL);
507  return ::CoCreateInstance(rclsid, pUnkOuter, dwClsContext, __uuidof(T), (void**)&p);
508  */
509  //Since we do not use it, we need not implement it
511  return E_NOTIMPL;
512  }
513  // BEWARE: CLSCTX_ALL is defined to 0 which is a fake value. if want to use this method, you need to define CLSCTX_ALL
514  HRESULT CoCreateInstance(LPCOLESTR szProgID, LPUNKNOWN pUnkOuter = NULL, DWORD dwClsContext = CLSCTX_ALL)
515  {
516  /*
517  CLSID clsid;
518  HRESULT hr = CLSIDFromProgID(szProgID, &clsid);
519  ATLASSERT(p == NULL);
520  if (SUCCEEDED(hr))
521  hr = ::CoCreateInstance(clsid, pUnkOuter, dwClsContext, __uuidof(T), (void**)&p);
522  return hr;
523  */
524  //Since we do not use it, we need not implement it
526  return E_NOTIMPL;
527  }
528  template <class Q>
529  HRESULT QueryInterface(Q** pp) const
530  {
531  /*
532  ATLASSERT(pp != NULL && *pp == NULL);
533  return p->QueryInterface(__uuidof(Q), (void**)pp);
534  */
535  //Since we do not use it, we need not implement it
537  return E_NOTIMPL;
538  }
539  T* p;
540  };
541 
542  //template <class T, const IID* piid = &__uuidof(T)>
543  template <class T, const IID* piid>
544  class CComQIPtr
545  {
546  public:
547  typedef T _PtrClass;
549  {
550  p=NULL;
551  }
552  CComQIPtr(T* lp)
553  {
554  if ((p = lp) != NULL)
555  p->AddRef();
556  }
558  {
559  if ((p = lp.p) != NULL)
560  p->AddRef();
561  }
563  {
564  p=NULL;
565  if (lp != NULL)
566  lp->QueryInterface(*piid, (void **)&p);
567  }
569  {
570  if (p)
571  p->Release();
572  }
573  void Release()
574  {
575  IUnknown* pTemp = p;
576  if (pTemp)
577  {
578  p = NULL;
579  pTemp->Release();
580  }
581  }
582  operator T*() const
583  {
584  return p;
585  }
586  T& operator*() const
587  {
588  ATLASSERT(p!=NULL); return *p;
589  }
590  //The assert on operator& usually indicates a bug. If this is really
591  //what is needed, however, take the address of the p member explicitly.
592  T** operator&()
593  {
594  ATLASSERT(p==NULL);
595  return &p;
596  }
598  {
599  ATLASSERT(p!=NULL);
601  }
602  T* operator=(T* lp)
603  {
604  return (T*)AtlComPtrAssign((IUnknown**)&p, lp);
605  }
607  {
608  return (T*)AtlComPtrAssign((IUnknown**)&p, lp.p);
609  }
611  {
612  return (T*)AtlComQIPtrAssign((IUnknown**)&p, lp, *piid);
613  }
614  bool operator!() const
615  {
616  return (p == NULL);
617  }
618  bool operator<(T* pT) const
619  {
620  return p < pT;
621  }
622  bool operator==(T* pT) const
623  {
624  return p == pT;
625  }
626  // Compare two objects for equivalence
627  bool IsEqualObject(IUnknown* pOther)
628  {
629  if (p == NULL && pOther == NULL)
630  return true; // They are both NULL objects
631 
632  if (p == NULL || pOther == NULL)
633  return false; // One is NULL the other is not
634 
635  CComPtr<IUnknown> punk1;
636  CComPtr<IUnknown> punk2;
637  p->QueryInterface(IID_IUnknown, (void**)&punk1);
638  pOther->QueryInterface(IID_IUnknown, (void**)&punk2);
639  return punk1 == punk2;
640  }
641  void Attach(T* p2)
642  {
643  if (p)
644  p->Release();
645  p = p2;
646  }
647  T* Detach()
648  {
649  T* pt = p;
650  p = NULL;
651  return pt;
652  }
653  HRESULT CopyTo(T** ppT)
654  {
655  ATLASSERT(ppT != NULL);
656  if (ppT == NULL)
657  return E_POINTER;
658  *ppT = p;
659  if (p)
660  p->AddRef();
661  return S_OK;
662  }
663  HRESULT SetSite(IUnknown* punkParent)
664  {
665  // return AtlSetChildSite(p, punkParent);
666  //Since we do not use it, we need not implement it
668  return E_NOTIMPL;
669  }
670  HRESULT Advise(IUnknown* pUnk, const IID& iid, LPDWORD pdw)
671  {
672  return AtlAdvise(p, pUnk, iid, pdw);
673  }
674  // BEWARE: CLSCTX_ALL is defined to 0 which is a fake value. if want to use this method, you need to define CLSCTX_ALL
675  HRESULT CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter = NULL, DWORD dwClsContext = CLSCTX_ALL)
676  {
677  /*
678  ATLASSERT(p == NULL);
679  return ::CoCreateInstance(rclsid, pUnkOuter, dwClsContext, __uuidof(T), (void**)&p);
680  */
681  //Since we do not use it, we need not implement it
683  return E_NOTIMPL;
684  }
685  // BEWARE: CLSCTX_ALL is defined to 0 which is a fake value. if want to use this method, you need to define CLSCTX_ALL
686  HRESULT CoCreateInstance(LPCOLESTR szProgID, LPUNKNOWN pUnkOuter = NULL, DWORD dwClsContext = CLSCTX_ALL)
687  {
688  /*
689  CLSID clsid;
690  HRESULT hr = CLSIDFromProgID(szProgID, &clsid);
691  ATLASSERT(p == NULL);
692  if (SUCCEEDED(hr))
693  hr = ::CoCreateInstance(clsid, pUnkOuter, dwClsContext, __uuidof(T), (void**)&p);
694  return hr;
695  */
696  //Since we do not use it, we need not implement it
698  return E_NOTIMPL;
699  }
700  template <class Q>
702  {
703  /*
704  ATLASSERT(pp != NULL && *pp == NULL);
705  return p->QueryInterface(__uuidof(Q), (void**)pp);
706  */
707  //Since we do not use it, we need not implement it
709  return E_NOTIMPL;
710  }
711  T* p;
712  };
713 }
714 
715 using namespace ATL;
716 
719 
720 #endif // __ATLBASE_H__
_ATL_CREATORARGFUNC * pFunc
Definition: Msi_atlbase.h:97
T * p
Definition: Msi_atlbase.h:711
LONG InterlockedDecrement(MSynch::AtomicLong *p)
Definition: Msi_atlbase.h:47
signed char BOOL
Definition: PDCwtypes.h:101
#define REFGUID
Definition: PDCwtypes.h:318
void Exception_unsafe_Unlock__which_should_NOT_be_used_because_of_imminent_deadlocks__Use_SmartLock_instead()
Definition: Msi_atlbase.h:219
CComMultiThreadModel CComGlobalsThreadModel
Definition: Msi_atlbase.h:285
T _PtrClass
Definition: Msi_atlbase.h:547
HRESULT SetSite(IUnknown *punkParent)
Definition: Msi_atlbase.h:491
CComQIPtr(const CComQIPtr< T, piid > &lp)
Definition: Msi_atlbase.h:557
bool IsEqualObject(IUnknown *pOther)
Definition: Msi_atlbase.h:455
ATLAPI AtlInternalQueryInterface(void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
IUnknown __RPC_FAR * LPUNKNOWN
Definition: Msi_oaidl.h:53
bool IsEqualGUID(const ::GUID &irGUID1, const ::GUID &irGUID2)
Definition: Base/Base/GUID.h:64
HRESULT CoCreateInstance(LPCOLESTR szProgID, LPUNKNOWN pUnkOuter=NULL, DWORD dwClsContext=CLSCTX_ALL)
Definition: Msi_atlbase.h:514
T * operator=(const CComPtr< T > &lp)
Definition: Msi_atlbase.h:438
T _PtrClass
Definition: Msi_atlbase.h:384
T ** operator &()
Definition: Msi_atlbase.h:592
#define E_POINTER
Definition: PDCwinerror.h:141
bool operator!() const
Definition: Msi_atlbase.h:442
T & operator*() const
Definition: Msi_atlbase.h:586
void Release()
Definition: Msi_atlbase.h:573
void Unlock()
Definition: Msi_atlbase.h:133
T & operator*() const
Definition: Msi_atlbase.h:417
CComCriticalSection CriticalSection
Definition: Msi_atlbase.h:261
T * operator=(IUnknown *lp)
Definition: Msi_atlbase.h:610
#define REFCLSID
Definition: PDCwtypes.h:328
Definition: Msi_atlbase.h:93
LONG * PLONG
Definition: PDCwtypes.h:135
typedef HRESULT(WINAPI _ATL_CREATORARGFUNC)(void *pv
BOOL InlineIsGUIDNULL(REFGUID rguid1)
Definition: Msi_atlbase.h:58
_NoAddRefReleaseOnCComPtr< T > * operator->() const
Definition: Msi_atlbase.h:429
static ULONG WINAPI Increment(MSynch::AtomicLong *p)
Definition: Msi_atlbase.h:268
virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject)=0
long HRESULT
Definition: FragmentedString.h:20
#define ATLASSERT(expr)
Definition: Msi_atldef.h:18
_ATL_CREATORFUNC * pfnGetClassObject
Definition: Msi_atlbase.h:296
void Lock()
Definition: Msi_atlbase.h:198
bool operator<(T *pT) const
Definition: Msi_atlbase.h:446
#define WINAPI
Definition: PDCwindows.h:52
ATLAPI AtlModuleGetClassObject(_ATL_MODULE *pM, REFCLSID rclsid, REFIID riid, LPVOID *ppv)
CComPtr(T *lp)
Definition: Msi_atlbase.h:389
unsigned long DWORD_PTR
Definition: Msi_atlbase.h:34
EXTERN_C DLL_MSICOM_EXIM IUnknown * AtlComPtrAssign(IUnknown **pp, IUnknown *lp)
Definition: Msi_atlbase.h:357
void Release()
Definition: Msi_atlbase.h:404
ATLAPI AtlModuleInit(_ATL_MODULE *pM, _ATL_OBJMAP_ENTRY *p, HINSTANCE h)
static ULONG WINAPI Decrement(MSynch::AtomicLong *p)
Definition: Msi_atlbase.h:273
int CompareGUID(const ::GUID &irGUID1, const ::GUID &irGUID2)
Definition: Base/Base/GUID.h:80
HRESULT Advise(IUnknown *pUnk, const IID &iid, LPDWORD pdw)
Definition: Msi_atlbase.h:670
#define CLSCTX_ALL
Definition: Msi_atlbase.h:37
_ATL_OBJMAP_ENTRY * m_pObjMap
Definition: Msi_atlbase.h:306
void * LPVOID
Definition: PDCwtypes.h:136
#define ATLAPI
Definition: Msi_atldef.h:26
unsigned int UINT
Definition: PDCwtypes.h:110
#define S_OK
Definition: PDCwinerror.h:31
#define NOT_IMP_ASSERTE
_ATL_NO_PRAGMA_WARNINGS
Definition: Msi_atlbase.h:19
bool operator!() const
Definition: Msi_atlbase.h:614
LONG InterlockedIncrement(MSynch::AtomicLong *p)
Definition: Msi_atlbase.h:46
static ULONG WINAPI Increment(MSynch::AtomicLong *p)
Definition: Msi_atlbase.h:228
bool operator==(T *pT) const
Definition: Msi_atlbase.h:450
void Exception_unsafe_Lock__which_should_NOT_be_used_because_of_imminent_deadlocks__Use_SmartLock_instead()
Definition: Msi_atlbase.h:214
HRESULT CopyTo(T **ppT)
Definition: Msi_atlbase.h:653
REFIID LPVOID * ppv
Definition: Msi_atlbase.h:90
static ULONG WINAPI Increment(MSynch::AtomicLong *p)
Definition: Msi_atlbase.h:250
BOOL InlineIsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: Msi_atlbase.h:53
bool operator==(T *pT) const
Definition: Msi_atlbase.h:622
ATLAPI AtlAdvise(IUnknown *pUnkCP, IUnknown *pUnk, const IID &iid, LPDWORD pdw)
HRESULT CoCreateInstance(LPCOLESTR szProgID, LPUNKNOWN pUnkOuter=NULL, DWORD dwClsContext=CLSCTX_ALL)
Definition: Msi_atlbase.h:686
void Init()
Definition: Msi_atlbase.h:137
CComFakeCriticalSection CriticalSection
Definition: Msi_atlbase.h:279
CComSingleThreadModel ThreadModelNoCS
Definition: Msi_atlbase.h:280
IUnknown * pCF
Definition: Msi_atlbase.h:298
CComQIPtr()
Definition: Msi_atlbase.h:548
CComFakeCriticalSection AutoCriticalSection
Definition: Msi_atlbase.h:238
bool IsGUIDNULL(const ::GUID &irGUID)
Definition: Base/Base/GUID.h:52
CComFakeCriticalSection AutoCriticalSection
Definition: Msi_atlbase.h:278
Definition: Msi_atlbase.h:121
HRESULT CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter=NULL, DWORD dwClsContext=CLSCTX_ALL)
Definition: Msi_atlbase.h:503
Definition: Msi_atlbase.h:302
REFIID LPVOID DWORD_PTR dw
Definition: Msi_atlbase.h:90
void Init()
Definition: Msi_atlbase.h:206
T * operator=(T *lp)
Definition: Msi_atlbase.h:602
void Attach(T *p2)
Definition: Msi_atlbase.h:469
static ULONG WINAPI Decrement(MSynch::AtomicLong *p)
Definition: Msi_atlbase.h:255
long InlineCompareGUID(const GUID &irGUID1, const GUID &irGUID2)
Definition: Msi_atlbase.h:63
Definition: Msi_atlbase.h:544
long LONG
Definition: PDCwtypes.h:119
void Unlock()
Definition: Msi_atlbase.h:202
CComMultiThreadModel CComObjectThreadModel
Definition: Msi_atlbase.h:284
UINT cbSize
Definition: Msi_atlbase.h:305
Definition: StrongPtr.h:50
Definition: Msi_atlbase.h:184
T * p
Definition: Msi_atlbase.h:539
~CComQIPtr()
Definition: Msi_atlbase.h:568
BOOL InlineIsEqualUnknown(REFGUID rguid1)
Definition: Msi_atlbase.h:68
CComFakeCriticalSection CriticalSection
Definition: Msi_atlbase.h:239
REFIID riid
Definition: Msi_atlbase.h:90
Definition: Msi_oaidl.h:41
Definition: Msi_atlbase.h:265
HRESULT QueryInterface(Q **pp) const
Definition: Msi_atlbase.h:529
CComPtr(const CComPtr< T > &lp)
Definition: Msi_atlbase.h:394
#define TRUE
Definition: PDCwtypes.h:58
bool operator<(T *pT) const
Definition: Msi_atlbase.h:618
Definition: Msi_atlbase.h:293
#define DLL_MSICOM_EXIM
Definition: MsiCOM.h:19
HRESULT SetSite(IUnknown *punkParent)
Definition: Msi_atlbase.h:663
Definition: Msi_atlbase.h:381
const CLSID * pclsid
Definition: Msi_atlbase.h:295
_ATL_CREATORFUNC * pfnCreateInstance
Definition: Msi_atlbase.h:297
_NoAddRefReleaseOnCComPtr< T > * operator->() const
Definition: Msi_atlbase.h:597
HRESULT QueryInterface(Q **pp)
Definition: Msi_atlbase.h:701
EXTERN_C const IID IID_IUnknown
Definition: Msi_oaidl.h:40
DWORD __RPC_FAR * LPDWORD
Definition: PDCwtypes.h:125
Definition: AtomicLong.h:71
CComCriticalSection(MSynch::EnumDSSLockStackCategory)
Definition: Msi_atlbase.h:125
HRESULT Advise(IUnknown *pUnk, const IID &iid, LPDWORD pdw)
Definition: Msi_atlbase.h:498
Definition: Msi_atlbase.h:225
#define FALSE
Definition: PDCwtypes.h:54
DWORD_PTR dw
Definition: Msi_atlbase.h:96
bool IsEqualObject(IUnknown *pOther)
Definition: Msi_atlbase.h:627
CComModule()
Definition: Msi_atlbase.h:333
CComMultiThreadModelNoCS ThreadModelNoCS
Definition: Msi_atlbase.h:240
~CComPtr()
Definition: Msi_atlbase.h:399
T * Detach()
Definition: Msi_atlbase.h:647
void Attach(T *p2)
Definition: Msi_atlbase.h:641
HRESULT CopyTo(T **ppT)
Definition: Msi_atlbase.h:481
#define EXTERN_C
Definition: PDCwtypes.h:62
virtual ULONG STDMETHODCALLTYPE Release(void)=0
CComQIPtr(IUnknown *lp)
Definition: Msi_atlbase.h:562
virtual ULONG STDMETHODCALLTYPE AddRef(void)=0
void Term()
Definition: Msi_atlbase.h:141
Definition: Msi_atlbase.h:247
HRESULT CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter=NULL, DWORD dwClsContext=CLSCTX_ALL)
Definition: Msi_atlbase.h:675
CComQIPtr(T *lp)
Definition: Msi_atlbase.h:552
static ULONG WINAPI Decrement(MSynch::AtomicLong *p)
Definition: Msi_atlbase.h:233
Definition: Msi_atlbase.h:373
T * Detach()
Definition: Msi_atlbase.h:475
CComAutoCriticalSection AutoCriticalSection
Definition: Msi_atlbase.h:260
void Lock()
Definition: Msi_atlbase.h:129
const OLECHAR __RPC_FAR * LPCOLESTR
Definition: PDCwtypes.h:394
ATLAPI AtlModuleTerm(_ATL_MODULE *pM)
T * operator=(T *lp)
Definition: Msi_atlbase.h:434
_ATL_OBJMAP_ENTRY * _NextObjectMapEntry(_ATL_MODULE *, _ATL_OBJMAP_ENTRY *pEntry)
Definition: Msi_atlbase.h:309
Definition: Msi_atlbase.h:149
T ** operator &()
Definition: Msi_atlbase.h:424
DWORD ULONG
Definition: PDCwtypes.h:127
CComPtr()
Definition: Msi_atlbase.h:385
unsigned long DWORD
Definition: PDCwtypes.h:121
#define NULL
Definition: Null.h:10
CComMultiThreadModelNoCS ThreadModelNoCS
Definition: Msi_atlbase.h:262
EXTERN_C DLL_MSICOM_EXIM IUnknown * AtlComQIPtrAssign(IUnknown **pp, IUnknown *lp, REFIID riid)
const IID * piid
Definition: Msi_atlbase.h:95
Definition: Msi_atlbase.h:42
#define E_NOTIMPL
Definition: PDCwinerror.h:105
EnumDSSLockStackCategory
Definition: LockCategories.h:32
void Term()
Definition: Msi_atlbase.h:210
Definition: Msi_atlbase.h:330
#define REFIID
Definition: PDCwtypes.h:321
Definition: Base/Base/GUID.h:32
ATLAPI AtlUnadvise(IUnknown *pUnkCP, const IID &iid, DWORD dw)
T * operator=(const CComQIPtr< T, piid > &lp)
Definition: Msi_atlbase.h:606
CComFakeCriticalSection(MSynch::EnumDSSLockStackCategory)
Definition: Msi_atlbase.h:188