windows-nt/Source/XPSP1/NT/shell/osshell/lmui/ntshrui/share.hxx

107 lines
2.1 KiB
C++
Raw Normal View History

2020-09-26 03:20:57 -05:00
//+-------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1995 - 1995.
//
// File: share.hxx
//
// Contents: CShare class definition to handle Sharing context menu
// and property sheet shell extensions.
//
// History: 4-Apr-95 BruceFo Created
//
//--------------------------------------------------------------------------
#ifndef _SHARE_HXX_
#define _SHARE_HXX_
class CShare
: public IShellExtInit,
public IShellPropSheetExt,
public IContextMenu
{
DECLARE_SIG;
public:
CShare();
~CShare();
//
// IUnknown methods
//
STDMETHOD(QueryInterface)(REFIID riid, LPVOID* ppvObj);
STDMETHOD_(ULONG,AddRef)();
STDMETHOD_(ULONG,Release)();
//
// IShellExtInit methods
//
STDMETHOD(Initialize)(
LPCITEMIDLIST pidlFolder,
LPDATAOBJECT pDataObject,
HKEY hkeyProgID);
//
// IShellPropSheetExt methods
//
STDMETHOD(AddPages)(
LPFNADDPROPSHEETPAGE lpfnAddPage,
LPARAM lParam);
STDMETHOD(ReplacePage)(
UINT uPageID,
LPFNADDPROPSHEETPAGE lpfnReplaceWith,
LPARAM lParam);
//
// IContextMenu methods
//
STDMETHOD(QueryContextMenu)(
HMENU hmenu,
UINT indexMenu,
UINT idCmdFirst,
UINT idCmdLast,
UINT uFlags);
STDMETHOD(InvokeCommand)(
LPCMINVOKECOMMANDINFO lpici);
STDMETHOD(GetCommandString)(
UINT_PTR idCmd,
UINT uType,
UINT* pwReserved,
LPSTR pszName,
UINT cchMax);
private:
HRESULT
_GetFSObject(
LPWSTR lpPath,
UINT cbMaxPath
);
BOOL
_IsShareableDrive(
VOID
);
BOOL
_OKToShare(
VOID
);
ULONG _uRefs; // OLE reference count
TCHAR _szPath[MAX_PATH];
BOOL _fPathChecked;
BOOL _fOkToSharePath;
BOOL _fMultipleSharesSelected;
};
#endif // _SHARE_HXX_