Desktop Functions: Smart Device Functions:
|
Search Results for "ShellExecute" in [All]shell321: Run [DllImport("shell32.dll", EntryPoint = "ShellExecute")] 2: 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
Public Structure SHELLEXECUTEINFO
public struct SHELLEXECUTEINFO
public enum ShellExecuteMaskFlags : uint 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.
Dim info As SHELLEXECUTEINFO
If Not ShellExecuteEx(info) Then The Process class uses ShellExecuteEx by default:
static extern bool ShellExecuteEx(ref SHELLEXECUTEINFO lpExecInfo);
SHELLEXECUTEINFO info = new SHELLEXECUTEINFO();
ShellExecuteEx(ref info);
Public Shared Function ShellExecuteEx(ByRef lpExecInfo As SHELLEXECUTEINFO) As Boolean
Dim sei As New SHELLEXECUTEINFO
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)
static extern UInt32 SHSetUnreadMailCount(string pszMailAddress, UInt32 dwCount, string pszShellExecuteCommand);
Public Shared Function SHSetUnreadMailCount(ByVal pszMailAddress As String, ByVal dwCount As Integer, ByVal pszShellExecuteCommand As String) As Integer Constants6: ShellAPI
/* error values for ShellExecute() beyond the regular WinExec() codes */ 7: ShellAPI
/* error values for ShellExecute() beyond the regular WinExec() codes */ advapi32
static extern bool SaferiIsExecutableFileType(string szFullPath, bool bFromShellExecute);
Declare Auto Function SaferiIsExecutableFileType Lib "advapi32.dll" (szFullPath as String, bFromShellExecute as Boolean) As Boolean |