Files
vxunderground-VX-API/VX-API/FastcallExecuteBinaryShellExecuteEx.cpp
vxunderground e8c5cd442d 2.0.402
2.0.402
2022-11-24 00:56:36 -06:00

39 lines
879 B
C++

#include "Win32Helper.h"
BOOL FastcallExecuteBinaryShellExecuteExW(_In_ PWCHAR FullPathToBinary, _In_ PWCHAR OptionalParameters)
{
SHELLEXECUTEINFOW Execute = { 0 };
Execute.cbSize = sizeof(SHELLEXECUTEINFOW);
Execute.lpVerb = L"open";
Execute.nShow = SW_SHOW;
if (!FullPathToBinary)
return FALSE;
Execute.lpFile = FullPathToBinary;
if (OptionalParameters)
Execute.lpParameters = OptionalParameters;
return ShellExecuteExW(&Execute);
}
BOOL FastcallExecuteBinaryShellExecuteExA(_In_ PCHAR FullPathToBinary, _In_ PCHAR OptionalParameters)
{
SHELLEXECUTEINFOA Execute = { 0 };
Execute.cbSize = sizeof(SHELLEXECUTEINFOW);
Execute.lpVerb = "open";
Execute.nShow = SW_SHOW;
if (!FullPathToBinary)
return FALSE;
Execute.lpFile = FullPathToBinary;
if (OptionalParameters)
Execute.lpParameters = OptionalParameters;
return ShellExecuteExA(&Execute);
}