Funktionreferenz


_WinAPI_ShellOpenWithDlg


Displays the Open With dialog box

#include <WinAPIDlg.au3>
_WinAPI_ShellOpenWithDlg ( $sFilePath [, $iFlags = 0 [, $hParent = 0]] )

Parameter

$sFilePath The file name.
$iFlags [optional] The characteristics of the Open With dialog box. This parameter can be one or more of the following values.
$OAIF_ALLOW_REGISTRATION
$OAIF_REGISTER_EXT
$OAIF_EXEC
$OAIF_FORCE_REGISTRATION
$OAIF_HIDE_REGISTRATION
$OAIF_URL_PROTOCOL
$hParent [optional] Handle of the parent window.

Rückgabewert

Success: 1.
Failure: 0 and sets the @error flag to non-zero, @extended flag may contain the HRESULT error code.

Bemerkungen

This function requires Windows Vista or later.

Siehe auch

Suche nach SHOpenWithDialog in der MSDN Bibliothek.

Beispiel

#include <APIDlgConstants.au3>
#include <MsgBoxConstants.au3>
#include <WinAPIDlg.au3>
#include <WinAPISys.au3>

If Number(_WinAPI_GetVersion()) < 6.0 Then
    MsgBox(($MB_ICONERROR + $MB_SYSTEMMODAL), 'Fehler', 'Benötigt Windows Vista oder neuer.')
    Exit
EndIf

_WinAPI_ShellOpenWithDlg(@ScriptFullPath, $OAIF_EXEC)