Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "ShellExecuteEx" in [All]

shell32

.

static extern TODO ShellExecuteExW(TODO);

.

Declare Function ShellExecuteExW Lib "shell32.dll" (TODO) As TODO

.
Documentation
[ShellExecuteExW] on MSDN
.
Summary
.

static extern bool ShellExecuteEx(ref SHELLEXECUTEINFO lpExecInfo);

.

Public Function ShellExecuteEx(ByRef lpExecInfo As SHELLEXECUTEINFO) As Boolean

.

Someone previously thought "the truth is in the headers - in this case ShellAPI.h, which declares them all as LPCSTR i.e. they're always ANSI not Unicode.". On the contrary, shellapi.h defines two versions of the structure, SHELLEXECUTEINFOA and SHELLEXECUTEINFOW, and ShellExecuteExW expects a SHELLEXECUTEINFOW structure... so although "LPCTSTR" never appears in the definition the effect is the same.

.

If Not ShellExecuteEx(info) Then

.

The Process class uses ShellExecuteEx by default:

.

static extern bool ShellExecuteEx(ref SHELLEXECUTEINFO lpExecInfo);

.

    ShellExecuteEx(ref info);

.

    Public Shared Function ShellExecuteEx(ByRef lpExecInfo As SHELLEXECUTEINFO) As Boolean

.

If Not ShellExecuteEx(sei) Then

.
Documentation
[ShellExecuteEx] on MSDN
.

With the above code (VB), I have had problems on Win 7 x64. By changing the build type to x86 in the advanced compile options, the code works... (Specifically, on Win7 x64, ShellExecuteEx returned NO error, but the file's property page was not displayed)


 
Access PInvoke.net directly from VS: