16.1 Creating a File Manager Extension

A File Manager extension must reside in a DLL that includes a standard entry point, the FMExtensionProc function. It must include the WFEXT.H header file that defines File Manager messages and structures. File Manager communicates with the extension DLL by sending the following messages to the DLL's FMExtensionProc function:

Message Meaning

1 through 99 User has selected an item from the extension-supplied menu. The value is the identifier of the selected menu item.
FMEVENT_INITMENU User has selected the extension's menu. The extension should initialize items in the menu.
FMEVENT_LOAD File Manager is loading the extension DLL and prompts the DLL for information about the menu that the DLL supplies.
FMEVENT_SELCHANGE Selection in the File Manager directory window or Search Results window has changed.
FMEVENT_UNLOAD Extension DLL is being unloaded.
FMEVENT_USER_REFRESH User has chosen the Refresh command from the Window menu. The extension should update items in the menu, if necessary.

For more information about these messages, see the following section. For information about the FMExtensionProc function, see the Microsoft Windows Programmer's Reference, Volume 2.