2020-07-07 07:15:45 +12:00
|
|
|
|
// <copyright file="FindExecuteable.cs" company="PlaceholderCompany">
|
|
|
|
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|
|
|
|
// </copyright>
|
2020-03-28 08:43:16 +13:00
|
|
|
|
|
2020-03-30 06:26:45 +13:00
|
|
|
|
namespace SystemTrayMenu.DllImports
|
2020-03-28 08:43:16 +13:00
|
|
|
|
{
|
2020-07-07 07:15:45 +12:00
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// wraps the methodcalls to native windows dll's.
|
|
|
|
|
/// </summary>
|
2020-03-28 08:43:16 +13:00
|
|
|
|
public static partial class NativeMethods
|
|
|
|
|
{
|
|
|
|
|
public static void Shell32FindExecutable(string lpFile, string lpDirectory, [Out] StringBuilder lpResult)
|
|
|
|
|
{
|
|
|
|
|
_ = FindExecutable(lpFile, lpDirectory, lpResult);
|
|
|
|
|
}
|
2020-07-08 03:05:19 +12:00
|
|
|
|
|
2020-10-20 00:11:41 +13:00
|
|
|
|
[DllImport("shell32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
|
2021-04-17 12:39:48 +12:00
|
|
|
|
[DefaultDllImportSearchPaths(DllImportSearchPath.UserDirectories)]
|
2020-07-08 03:05:19 +12:00
|
|
|
|
private static extern int FindExecutable(string lpFile, string lpDirectory, [Out] StringBuilder lpResult);
|
2020-03-28 08:43:16 +13:00
|
|
|
|
}
|
|
|
|
|
}
|