NativeMethods.ShellExecute Method
Performs an operation on a file by using the Windows Shell.
Namespace: Microsoft.VisualStudio
Assembly: Microsoft.VisualStudio.Data.Schema.Project (in Microsoft.VisualStudio.Data.Schema.Project.dll)
Syntax
'Declaration
Public Shared Function ShellExecute ( _
hParentWnd As IntPtr, _
operation As String, _
file As String, _
parameters As String, _
directory As String, _
showCmd As Integer _
) As IntPtr
'Usage
Dim hParentWnd As IntPtr
Dim operation As String
Dim file As String
Dim parameters As String
Dim directory As String
Dim showCmd As Integer
Dim returnValue As IntPtr
returnValue = NativeMethods.ShellExecute(hParentWnd, _
operation, file, parameters, directory, _
showCmd)
public static IntPtr ShellExecute(
IntPtr hParentWnd,
string operation,
string file,
string parameters,
string directory,
int showCmd
)
public:
static IntPtr ShellExecute(
IntPtr hParentWnd,
String^ operation,
String^ file,
String^ parameters,
String^ directory,
int showCmd
)
public static function ShellExecute(
hParentWnd : IntPtr,
operation : String,
file : String,
parameters : String,
directory : String,
showCmd : int
) : IntPtr
static member ShellExecute :
hParentWnd:IntPtr *
operation:string *
file:string *
parameters:string *
directory:string *
showCmd:int -> IntPtr
Parameters
- hParentWnd
Type: System.IntPtr
Handle to the parent window
- operation
Type: System.String
The operation to perform
- file
Type: System.String
Full path of the file for which to perform the operation
- parameters
Type: System.String
Any parameters passed into the operation
- directory
Type: System.String
The default directory
- showCmd
Type: System.Int32
Specifies how the application should display
Return Value
Type: System.IntPtr
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.