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.

58 lines
1.7 KiB

  1. // Create Instance functions
  2. #ifndef _SCCLS_H_
  3. #define _SCCLS_H_
  4. //
  5. // global object array - used for class factory, auto registration, type libraries, oc information
  6. //
  7. typedef struct tagOBJECTINFO
  8. {
  9. #ifdef __cplusplus
  10. void *cf;
  11. #else
  12. const IClassFactoryVtbl *cf;
  13. #endif
  14. CLSID const* pclsid;
  15. HRESULT (*pfnCreateInstance)(IUnknown* pUnkOuter, IUnknown** ppunk, const struct tagOBJECTINFO *);
  16. // for OCs and automation objects:
  17. IID const* piid;
  18. IID const* piidEvents;
  19. long lVersion;
  20. DWORD dwOleMiscFlags;
  21. DWORD dwClassFactFlags;
  22. } OBJECTINFO;
  23. typedef OBJECTINFO const * LPCOBJECTINFO;
  24. #define OIF_ALLOWAGGREGATION 0x0001
  25. #define VERSION_2 2 // so we don't get confused by too many integers
  26. #define VERSION_1 1
  27. #define VERSION_0 0
  28. #define COCREATEONLY NULL,NULL,VERSION_0,0,0 // piid,piidEvents,lVersion,dwOleMiscFlags,dwClassFactFlags
  29. #define COCREATEONLY_NOFLAGS NULL,NULL,VERSION_0,0 // piid,piidEvents,lVersion,dwOleMiscFlags
  30. STDAPI CShellAppManager_CreateInstance(IUnknown* pUnkOuter, IUnknown** ppunk, LPCOBJECTINFO poi);
  31. STDAPI CEnumInstalledApps_CreateInstance(IUnknown* pUnkOuter, IUnknown** ppunk, LPCOBJECTINFO poi);
  32. #ifndef DOWNLEVEL_PLATFORM
  33. STDAPI CDarwinAppPublisher_CreateInstance(IUnknown* pUnkOuter, IUnknown** ppunk, LPCOBJECTINFO poi);
  34. #endif //DOWNLEVEL_PLATFORM
  35. // to save some typing:
  36. #define CLSIDOFOBJECT(p) (*((p)->_pObjectInfo->pclsid))
  37. #define VERSIONOFOBJECT(p) ((p)->_pObjectInfo->lVersion)
  38. #define EVENTIIDOFCONTROL(p) (*((p)->_pObjectInfo->piidEvents))
  39. #define OLEMISCFLAGSOFCONTROL(p) ((p)->_pObjectInfo->dwOleMiscFlags)
  40. extern const OBJECTINFO g_ObjectInfo[]; // sccls.c
  41. STDAPI GetClassObject(REFCLSID rclsid, REFIID riid, void **ppv);
  42. #endif // _SCCLS_H_