4 Virtual Floppy Drive for Windows
5 Driver control library local header
7 Copyright (C) 2003-2005 Ken Kato
13 #define VFD_LIBRARY_FILENAME "vfd.dll"
15 #ifdef VFD_EMBED_DRIVER
16 #define VFD_DRIVER_NAME_ID VFD_DRIVER
17 #define VFD_DRIVER_TYPE_ID BINARY
27 // DLL instance handle
29 extern HINSTANCE g_hDllModule
;
32 // Reference count for the DLL
34 extern UINT g_cDllRefCnt
;
37 // VFD notification message value
39 extern UINT g_nNotifyMsg
;
42 // VFD notification message register string
44 #define VFD_NOTIFY_MESSAGE "VfdNotifyMessage"
47 // Message box title string
49 #define VFD_MSGBOX_TITLE "Virtual Floppy Drive"
52 // shell extention string constants
54 #define VFDEXT_DESCRIPTION "VFD shell extension"
55 #define VFDEXT_MENU_REGKEY "Drive\\shellex\\ContextMenuHandlers\\VFD"
56 #define VFDEXT_DND_REGKEY "Drive\\shellex\\DragDropHandlers\\VFD"
57 #define VFDEXT_PROP_REGKEY "Drive\\shellex\\PropertySheetHandlers\\VFD"
58 #define VFDEXT_INFO_REGKEY "Drive\\shellex\\{00021500-0000-0000-C000-000000000046}"
60 //=====================================
61 // Image handling functions
62 //=====================================
64 // Format a buffer with FAT12
66 DWORD
FormatBufferFat(
70 // Extract image information from a zip compressed file
76 // Extract original image from a zip compressed file
78 DWORD
ExtractZipImage(
83 //=====================================
84 // GUI utility functions
85 //=====================================
87 typedef struct _SAVE_PARAM
{
89 VFD_DISKTYPE DiskType
;
92 VFD_FILETYPE FileType
;
95 } SAVE_PARAM
, PSAVE_PARAM
;
97 typedef const SAVE_PARAM CSAVE_PARAM
, *PCSAVE_PARAM
;
101 PCSAVE_PARAM pParam
);
103 void ShowContextMenu(
113 // Set a message to a control window
120 //==============================
121 // Message extract functions
122 //==============================
124 // Return a system error message
129 // Return a message from this DLL module
134 //==============================
136 //==============================
138 #define IS_WINDOWS_NT() ((GetVersion() & 0xff) < 5)
140 //==============================
142 //==============================
145 extern ULONG TraceFlags
;
147 extern PCHAR TraceFile
;
149 extern CHAR
const * TraceFile
;
151 extern ULONG TraceLine
;
153 #define VFDTRACE(LEVEL,STRING) \
154 if ((TraceFlags & (LEVEL)) == (LEVEL)) { \
155 TraceFile = __FILE__; \
156 TraceLine = __LINE__; \
160 void DebugTrace(PCSTR sFormat
, ...);
163 #define VFDTRACE(LEVEL,STRING)
167 // supplement old system headers
169 #ifndef INVALID_FILE_ATTRIBUTES
170 #define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
171 #endif // INVALID_FILE_ATTRIBUTES
173 #if defined(_INC_COMMDLG) && !defined(OPENFILENAME_SIZE_VERSION_400)
174 // Pre Win2K system header is used
175 // OPENFILENAME is defined without extra fields.
176 #define OPENFILENAME_SIZE_VERSION_400 sizeof(OPENFILENAME)
177 #endif // __INC_COMMDLG && !OPENFILENAME_SIZE_VERSION_400
181 #endif // __cplusplus