xref: /reactos/modules/rosapps/lib/vfdlib/vfdshext.h (revision 0c2cdcae)
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 #ifndef __REACTOS__
71 		UINT			idCmd,
72 #else
73 		UINT_PTR		idCmd,
74 #endif
75 		UINT			uFlags,
76 		UINT			*reserved,
77 		LPSTR			pszName,
78 		UINT			cchMax);
79 
80 	//	IShellPropSheetExt inheritance
81 	STDMETHODIMP AddPages(
82 		LPFNADDPROPSHEETPAGE lpfnAddPage,
83 		LPARAM			lParam);
84 
85 	STDMETHODIMP ReplacePage(
86 		UINT			uPageID,
87 		LPFNADDPROPSHEETPAGE lpfnReplaceWith,
88 		LPARAM			lParam);
89 /*
90 	//	IQueryInfo inheritance
91 
92 	STDMETHODIMP GetInfoFlags(
93 		DWORD *pdwFlags);
94 
95 	STDMETHODIMP GetInfoTip(
96 		DWORD dwFlags,
97 		LPWSTR *ppwszTip);
98 */
99 };
100 
101 typedef CVfdShExt *LPCVFDSHEXT;
102 
103 #endif	// _VFDSHEXT_H_
104