DVP_IdentifyFileStream(
HWND:hWnd,
LPSTREAM:lpStream,
LPTSTR:lpszName,
LPVIEWERPLUGINFILEINFO:lpVPFileInfo,
DWORD:dwStreamFlags
)
→ BOOL
This parameter contains flags that describe the data stream specified in the lpStream parameter. You may use this information to decide whether or not your plugin is to handle this file. The flags currently defined are:
| DVPSF_Slow | If set, this flag indicates that the data stream is "slow" - that is, access to the file may potentially take a long time. Currently this is only set for FTP sites. |
| DVPSF_NoRandomSeek | If set, this flag indicates that the data stream does not support random seeking - that it can only be read sequentially from beginning to end. Currently this will be set for both FTP and ZIP files. |
The DVP_IdentifyFileStream function is called to identify a file from a data stream.
Directory Opus viewer plugins support 'virtual files' or those that are not based on disk media - for example, files residing on remote FTP sites or within ZIP files. To access these files, your plugin must support reading data from an IStream object.
If your plugin specified the DVPFIF_CanHandleStreams flag, and the file to be identified is not a disk-based file, then Directory Opus will call your DVP_IdentifyFileStream function to identify the file.
This function is similar to the DVP_IdentifyFile function except that the filename parameter does not refer to a real disk file that you can open and read from. Instead, you must use the lpStream parameter to read data from the supplied data stream. Please see the Microsoft MSDN library for more information about COM and the IStream interface.
Note that there is no hAbortEvent parameter for this function. This is because the IStream object that Directory Opus supplies supports the abort mechanism internally. If the user aborts your plugin's operation, the data stream will automatically return failure for any attempted read function.