Retrieves a file's perceived type based on its extension
#include <WinAPIReg.au3>
_WinAPI_AssocGetPerceivedType ( $sExt )
$sExt | The file's extension. This should include the leading period, for example ".txt". |
Success: | The array containing the following information: [0] - The perceived type ($PERCEIVED_TYPE_*). [1] - The source of the perceived type information ($PERCEIVEDFLAG_*). [2] - The perceived type string, for instance "text" or "video". |
Failure: | Sets the @error flag to non-zero, @extended flag may contain the HRESULT error code. |
Search AssocGetPerceivedType in MSDN Library.
#include <WinAPIReg.au3>
Local $sExt = '.wav'
Local $aData = _WinAPI_AssocGetPerceivedType($sExt)
If IsArray($aData) Then
ConsoleWrite('(' & $sExt & ')' & @CRLF)
ConsoleWrite('--------------------' & @CRLF)
ConsoleWrite('Type: ' & $aData[0] & @CRLF)
ConsoleWrite('Source: ' & $aData[1] & @CRLF)
ConsoleWrite('String: ' & $aData[2] & @CRLF)
EndIf