根据文件扩展名检索文件的理解(perceived)类型.
#Include <WinAPIEx.au3>
_WinAPI_AssocGetPerceivedType ( $sExt )
$sExt | 文件的扩展名.必须包括前导句点,例如 ".txt". |
成功: | 返回包含以下参数的数组: |
[0] - 理解(perceived)类型 ($PERCEIVED_TYPE_*). | |
[1] - 理解(perceived)类型源信息($PERCEIVEDFLAG_*). | |
[2] - 理解(perceived)类型字符串 "text" or "video". | |
失败: | 返回 0,设置@error:非 0, @extended 标志可能包含一个系统错误代码. |
在MSDN中搜索
#Include <WinAPIEx.au3>
Opt('MustDeclareVars', 1)
Global $Ext = '.wav'
Global $Data = _WinAPI_AssocGetPerceivedType($Ext)
If IsArray($Data) Then
ConsoleWrite('(' & $Ext & ')' & @CR)
ConsoleWrite('--------------------' & @CR)
ConsoleWrite('Type: ' & $Data[0] & @CR)
ConsoleWrite('Source: ' & $Data[1] & @CR)
ConsoleWrite('String: ' & $Data[2] & @CR)
EndIf