windows: changes to install/upgrade/uninstallation process (#9025)

This commit is contained in:
dave caruso
2024-02-27 03:11:43 -08:00
committed by GitHub
parent fd6fd78f0f
commit 4e2d00d052
13 changed files with 430 additions and 130 deletions

View File

@@ -3091,6 +3091,11 @@ pub extern "kernel32" fn OpenProcess(
// https://learn.microsoft.com/en-us/windows/win32/procthread/process-security-and-access-rights
pub const PROCESS_QUERY_LIMITED_INFORMATION: DWORD = 0x1000;
pub fn exePathW() [:0]const u16 {
const image_path_unicode_string = &std.os.windows.peb().ProcessParameters.ImagePathName;
return image_path_unicode_string.Buffer[0 .. image_path_unicode_string.Length / 2 :0];
}
pub const KEY_EVENT_RECORD = extern struct {
bKeyDown: BOOL,
wRepeatCount: WORD,