Analyze file type (deprecated)
Method |
AnalyzeFileType |
Description |
This method analyzes the contents of a file and attempts to guess its type. |
Note |
deprecated |
Function prototype
HRESULT
AnalyzeFileType
(
[in] VARIANT FileNameOrBuffer,
[out] VARIANT * FileTypeLong,
[out, retval] VARIANT * FilteTypeShort
)
Arguments
Argument |
Description |
Data Type |
FileNameOrBuffer |
If FileNameOrBuffer is of type string then it is treated as a file name to be analyzed. Otherwise, if it is a byte array (Byte []) it is treated as a memory buffer that should be analyzed. |
File name: string Buffer: byte array |
FileTypeLong |
If the pointer that is passed to the method is not null, then the VARIANT will be filled with a string describing the file type in detail. |
string |
FileTypeShort |
A series of letters that summarize the file type. |
string |
The string returned in FileTypeLong is a series of types that match the file. If the file matches more than one type (sometimes it’s impossible to tell the difference), the returned string will contain all the possible file types separated by ‘,’.
The string returned in FileTypeShort is a string comprised of letters that give the rough classification of the file.