Desktop Functions: Smart Device Functions:
|
Search Results for "ShellExecuteEx" in [All]shell321: ShellExecute
static extern TODO ShellExecuteExW(TODO);
Declare Function ShellExecuteExW Lib "shell32.dll" (TODO) As TODO
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 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) |