Function Reference


_WinAPI_AssocGetPerceivedType

Retrieves a file's perceived type based on its extension

#include <WinAPIReg.au3>
_WinAPI_AssocGetPerceivedType ( $sExt )

Parameters

$sExt The file's extension. This should include the leading period, for example ".txt".

Return Value

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.

See Also

Search AssocGetPerceivedType in MSDN Library.

Example

#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