~~Title: DVP_IdentifyFileStream~~ DVP_IdentifyFileStream && BOOL && The **DVP_IdentifyFileStream** function must, if appropriate, fill out the **VIEWERPLUGINFILEINFO** structure in the same way as the [[dvp_identifyfile|DVP_IdentifyFile]] function and return either **TRUE** or **FALSE** to indicate if the file can be handled. && hWnd && HWND && This parameter specifies the parent window handle that should be used to display any error messages if appropriate. && lpStream && LPSTREAM && This points to an **IStream** COM object that you must read from in order to identify the file contents. The **dwStreamFlags** parameter provides additional information about this data stream. && lpszName && LPTSTR && Supplies the name of the file, including the full path. However, as this is not a real disk file the only use for this is for identifying the file based on the file name extension. && lpVPFileInfo && LPVIEWERPLUGINFILEINFO && This parameter points to a **VIEWERPLUGINFILEINFO** structure that must be filled out if the plugin recognizes and can view the file. See [[dvp_identifyfile|DVP_IdentifyFile]] for a description of this structure. && dwStreamFlags && DWORD && 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|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.