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.

56 lines
1.3 KiB

  1. // ShareInfo.h : Declaration of the CShareInfo
  2. #ifndef __SHAREINFO_H_
  3. #define __SHAREINFO_H_
  4. #include "resource.h" // main symbols
  5. /////////////////////////////////////////////////////////////////////////////
  6. // CShareInfo
  7. class ATL_NO_VTABLE CShareInfo :
  8. public CComObjectRootEx<CComMultiThreadModel>,
  9. public CComCoClass<CShareInfo, &CLSID_ShareInfo>,
  10. public ISupportErrorInfo,
  11. public IDispatchImpl<IShareInfo, &IID_IShareInfo, &LIBID_OPENFILESLib>
  12. {
  13. public:
  14. CShareInfo()
  15. {
  16. m_pUnkMarshaler = NULL;
  17. }
  18. DECLARE_REGISTRY_RESOURCEID(IDR_SHAREINFO)
  19. DECLARE_GET_CONTROLLING_UNKNOWN()
  20. DECLARE_PROTECT_FINAL_CONSTRUCT()
  21. BEGIN_COM_MAP(CShareInfo)
  22. COM_INTERFACE_ENTRY(IShareInfo)
  23. COM_INTERFACE_ENTRY(IDispatch)
  24. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  25. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pUnkMarshaler.p)
  26. END_COM_MAP()
  27. HRESULT FinalConstruct()
  28. {
  29. return CoCreateFreeThreadedMarshaler(
  30. GetControllingUnknown(), &m_pUnkMarshaler.p);
  31. }
  32. void FinalRelease()
  33. {
  34. m_pUnkMarshaler.Release();
  35. }
  36. CComPtr<IUnknown> m_pUnkMarshaler;
  37. // ISupportsErrorInfo
  38. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  39. // IShareInfo
  40. public:
  41. STDMETHOD( SetShareInfo )( BSTR bstrShareName, DWORD dwCache );
  42. };
  43. #endif //__SHAREINFO_H_