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.

32 lines
845 B

  1. // Copyright (c) 1999 Microsoft Corporation
  2. // dll.h
  3. //
  4. // Class factory
  5. //
  6. #pragma once
  7. void LockModule(bool fLock);
  8. long *GetModuleLockCounter();
  9. typedef HRESULT (PFN_CreateInstance)(IUnknown *pUnkOuter, const IID &iid, void **ppv);
  10. class CDMScriptingFactory : public IClassFactory
  11. {
  12. public:
  13. // Constructor
  14. CDMScriptingFactory(PFN_CreateInstance *pfnCreate) : m_cRef(0), m_pfnCreate(pfnCreate) { assert(m_pfnCreate); }
  15. // IUnknown
  16. virtual STDMETHODIMP QueryInterface(const IID &iid, void **ppv);
  17. virtual STDMETHODIMP_(ULONG) AddRef();
  18. virtual STDMETHODIMP_(ULONG) Release();
  19. // Interface IClassFactory
  20. virtual STDMETHODIMP CreateInstance(IUnknown* pUnknownOuter, const IID& iid, void** ppv);
  21. virtual STDMETHODIMP LockServer(BOOL bLock);
  22. private:
  23. long m_cRef;
  24. PFN_CreateInstance *m_pfnCreate;
  25. };