DVP_IdentifyFileBytes(
HWND:hWnd,
LPTSTR:lpszName,
LPBYTE:lpData,
UINT:uiDataSize,
LPVIEWERPLUGINFILEINFO:lpVPFileInfo,
DWORD:dwStreamFlags
)
→ BOOL
If the file is not disk-based but instead is on an FTP site or within a ZIP file, then its data will be read via an IStream data stream. In this instance, the dwStreamFlags parameter may contain information about this data stream. 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_IdentifyFileBytes function is called to identify a file based on the file header.
If your plugin specifies the DVPFIF_CanHandleBytes flag, then Directory Opus will call your DVP_IdentifyFileBytes function if possible instead of DVP_IdentifyFile.
This method of file recognition is recommended if you can reliably identify files based on a chunk of data from the start of the file. Currently, this data chunk is 256 bytes in size.