A File Manager extension sends an FM_GETFILESEL message to retrieve information about a selected file from the active File Manager window (either the directory window or the Search Results window).
FM_GETFILESEL wParam = (WPARAM) index; // index of selected file lParam = (LPARAM) (LPFMS_GETFILESEL) lpfmsgfs; // file data
The return value is the zero-based index of the selected file that was retrieved.
An extension can use the FM_GETSELCOUNT message to get the count of selected files.
FMExtensionProc, FMS_GETFILESEL, FM_GETFILESELLFN, FM_GETSELCOUNT, FM_GETSELCOUNTLFN