xref: /reactos/modules/rosapps/lib/vfdlib/vfdshext.h (revision 0622ce17)
1 /*
2 	vfdshext.h
3 
4 	Virtual Floppy Drive for Windows
5 	Driver control library
6 	shell extension COM class header
7 
8 	Copyright (c) 2003-2005 Ken Kato
9 */
10 
11 #ifndef _VFDSHEXT_H_
12 #define _VFDSHEXT_H_
13 
14 //
15 // CVfdShExt
16 // COM Shell extension class
17 //
18 class CVfdShExt : public	IContextMenu,
19 							IShellExtInit,
20 							IShellPropSheetExt
21 //							IQueryInfo
22 {
23 protected:
24 	ULONG			m_cRefCnt;				//	reference count
25 	LPDATAOBJECT	m_pDataObj;				//	IDataObject pointer
26 	ULONG			m_nDevice;				//	VFD device number
27 	CHAR			m_sTarget[MAX_PATH];	//	target path
28 	BOOL			m_bDragDrop;
29 
30 public:
31 	//	constructor / destructor
32 	CVfdShExt();
33 	~CVfdShExt();
34 
35 	//	perform VFD operations
36 	DWORD DoVfdOpen(HWND hParent);
37 	DWORD DoVfdNew(HWND hParent);
38 	DWORD DoVfdClose(HWND hParent);
39 	DWORD DoVfdSave(HWND hParent);
40 	DWORD DoVfdProtect(HWND hParent);
41 	DWORD DoVfdDrop(HWND hParent);
42 
43 	//	get current attributes
44 	ULONG	GetDevice()	{ return m_nDevice; }
45 	PCSTR	GetTarget()	{ return m_sTarget; }
46 
47 	//	IUnknown inheritance
48 	STDMETHODIMP QueryInterface(REFIID, LPVOID *);
49 	STDMETHODIMP_(ULONG) AddRef();
50 	STDMETHODIMP_(ULONG) Release();
51 
52 	//	IShellExtInit inheritance
53 	STDMETHODIMP Initialize(
54 		LPCITEMIDLIST	pIDFolder,
55 		LPDATAOBJECT	pDataObj,
56 		HKEY			hKeyID);
57 
58 	//	IContextMenu inheritance
59 	STDMETHODIMP QueryContextMenu(
60 		HMENU			hMenu,
61 		UINT			indexMenu,
62 		UINT			idCmdFirst,
63 		UINT			idCmdLast,
64 		UINT			uFlags);
65 
66 	STDMETHODIMP InvokeCommand(
67 		LPCMINVOKECOMMANDINFO lpcmi);
68 
69 	STDMETHODIMP GetCommandString(
70 		UINT			idCmd,
71 		UINT			uFlags,
72 		UINT			*reserved,
73 		LPSTR			pszName,
74 		UINT			cchMax);
75 
76 	//	IShellPropSheetExt inheritance
77 	STDMETHODIMP AddPages(
78 		LPFNADDPROPSHEETPAGE lpfnAddPage,
79 		LPARAM			lParam);
80 
81 	STDMETHODIMP ReplacePage(
82 		UINT			uPageID,
83 		LPFNADDPROPSHEETPAGE lpfnReplaceWith,
84 		LPARAM			lParam);
85 /*
86 	//	IQueryInfo inheritance
87 
88 	STDMETHODIMP GetInfoFlags(
89 		DWORD *pdwFlags);
90 
91 	STDMETHODIMP GetInfoTip(
92 		DWORD dwFlags,
93 		LPWSTR *ppwszTip);
94 */
95 };
96 
97 typedef CVfdShExt *LPCVFDSHEXT;
98 
99 #endif	// _VFDSHEXT_H_
100