Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1007 B

  1. /*
  2. ** _StdClassImplementations
  3. ** Defines the standard implementations for a class object.
  4. */
  5. #define _StdClassImplementations(Impl) \
  6. STDMETHODIMP QueryInterface(const IID FAR& riid, void FAR* FAR* ppv); \
  7. STDMETHODIMP_(ULONG) AddRef(); \
  8. STDMETHODIMP_(ULONG) Release()
  9. /* - - - - - - - - */
  10. class FAR CAppCF : IClassFactory {
  11. public:
  12. static HRESULT MakeInst(const CLSID FAR& rclsid, const IID FAR& riid, void FAR* FAR* ppv);
  13. private:
  14. CAppCF(const CLSID FAR& rclsid, IUnknown FAR* FAR* ppUnknown);
  15. ULONG m_refs;
  16. public:
  17. _StdClassImplementations(CAppCF);
  18. STDMETHODIMP CreateInstance(IUnknown FAR* pUnknownOuter, const IID FAR& riid, void FAR* FAR* ppv);
  19. STDMETHODIMP LockServer(BOOL fLock);
  20. public:
  21. CLSID m_clsid;
  22. };
  23. /*
  24. ** The usage counter keeps track of the overall usage of objects based on
  25. ** implementations provided by the component. This allows one to determine
  26. ** when the implementation is no longer in use.
  27. */
  28. extern UINT uUseCount;
  29. extern BOOL fLocked;