Leaked source code of windows server 2003
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.

53 lines
1.3 KiB

  1. // File: clclsfct.h
  2. #ifndef _CLCLSFCT_H_
  3. #define _CLCLSFCT_H_
  4. //////////////////////////////////////////////////////////////////////////
  5. // New Object
  6. typedef PIUnknown (*NEWOBJECTPROC)(OBJECTDESTROYEDPROC);
  7. DECLARE_STANDARD_TYPES(NEWOBJECTPROC);
  8. typedef struct classconstructor
  9. {
  10. PCCLSID pcclsid;
  11. NEWOBJECTPROC NewObject;
  12. }
  13. CLASSCONSTRUCTOR;
  14. DECLARE_STANDARD_TYPES(CLASSCONSTRUCTOR);
  15. //////////////////////////////////////////////////////////////////////////
  16. // object class factory
  17. class CCLClassFactory : public RefCount, public IClassFactory
  18. {
  19. private:
  20. NEWOBJECTPROC m_NewObject;
  21. public:
  22. CCLClassFactory(NEWOBJECTPROC NewObject, OBJECTDESTROYEDPROC ObjectDestroyed);
  23. ~CCLClassFactory(void);
  24. // IUnknown methods
  25. ULONG STDMETHODCALLTYPE AddRef(void);
  26. ULONG STDMETHODCALLTYPE Release(void);
  27. HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, PVOID *ppvObj);
  28. // IClassFactory methods
  29. HRESULT STDMETHODCALLTYPE CreateInstance(PIUnknown piunkOuter, REFIID riid, PVOID *ppvObject);
  30. HRESULT STDMETHODCALLTYPE LockServer(BOOL bLock);
  31. };
  32. DECLARE_STANDARD_TYPES(CCLClassFactory);
  33. HRESULT GetClassConstructor(REFCLSID rclsid, PNEWOBJECTPROC pNewObject);
  34. VOID DllLock(void);
  35. VOID DllRelease(void);
  36. #endif /* _CLCLSFCT_H_ */