Funktionreferenz


_WinAPI_AssocGetPerceivedType


Retrieves a file's perceived type based on its extension

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

Parameter

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

Rückgabewert

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.

Bemerkungen

None.

Siehe auch

Suche nach AssocGetPerceivedType in der MSDN Bibliothek.

Beispiel

#include <WinAPIReg.au3>

Local $sExt = '.wav'
Local $aData = _WinAPI_AssocGetPerceivedType($sExt)

If IsArray($aData) Then
    ConsoleWrite('(' & $sExt & ')' & @CRLF)
    ConsoleWrite('--------------------' & @CRLF)
    ConsoleWrite('Typ:   ' & $aData[0] & @CRLF)
    ConsoleWrite('Quelle: ' & $aData[1] & @CRLF)
    ConsoleWrite('String: ' & $aData[2] & @CRLF)
EndIf