Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than shell32, prefix the name with the module name and a period.
Private Declare Function FindExecutable Lib "shell32" Alias "FindExecutableA" _
(ByVal lpFile As String, _
ByVal lpDirectory As String, _
ByVal sResult As String) As IntPtr
User-Defined Types:
None.
Notes:
1) When using VB, one cannot place the declaration for FindExecutable within the code portion
of a form. If one needs to search for an executeable from within a form, though, it is easy
enough to open a module and place the declaration there. From the form code, make a call to
a function in the module. Within the module function, execute FindExecutable and return any
results to the form routine.
public class Win32API
{
[DllImport("shell32.dll", EntryPoint="FindExecutable")]
public static extern long FindExecutableA(
string lpFile, string lpDirectory, StringBuilder lpResult);
public static string FindExecutable(
string pv_strFilename)
{
StringBuilder objResultBuffer =
new StringBuilder(1024);
long lngResult = 0;
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).