ShellExecute (shell32)
Last changed: -188.102.225.40

.
Summary

C# Signature:

[DllImport("shell32.dll")]
static extern IntPtr ShellExecute(
    IntPtr hwnd,
    string lpOperation,
    string lpFile,
    string lpParameters,
    string lpDirectory,
    int nShowCmd);

User-Defined Types:

None.

Notes:

None.

Tips & Tricks:

Possible values for lpOperation

edit

explore

find

open

print

NULL - Performs the default action (prior to Win2k) normally open

Sample Code:

private void suppoerLabel_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)

{

    // Asks default mail client to send an email to the specified address.
    ShellExecute( IntPtr.Zero, "open", "mailto:support@microsoft.com", "", "", 0 );

}

[DllImport("shell32.dll")]

static extern IntPtr ShellExecute( IntPtr hwnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, int nShowCmd );

Alternative Managed API:

Do you know one? Please contribute it!

Documentation