You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current code appends the process name from GetModuleFileNameW:
// Lookup a DWORD value under HKLM\...\Image File Execution Options\<current process name>inline DWORD GetCurrentProcessExecutionOption(PCWSTR valueName, DWORD defaultValue = 0)
{
auto filePath = wil::GetModuleFileNameW<wil::unique_cotaskmem_string>();
if (auto lastSlash = wcsrchr(filePath.get(), L'\\'))
{
constauto fileName = lastSlash + 1;
auto keyPath = wil::str_concat<wil::unique_cotaskmem_string>(LR"(SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\)",
fileName);
My code (for reasons) needs to use a value different from a process name that hosts my DLL and other DLLs, so I'd like a unique identifier. I realize this is probably overloading the intention of this method, but it would be convenient to have:
Current code appends the process name from GetModuleFileNameW:
My code (for reasons) needs to use a value different from a process name that hosts my DLL and other DLLs, so I'd like a unique identifier. I realize this is probably overloading the intention of this method, but it would be convenient to have:
The text was updated successfully, but these errors were encountered: