@@ -781,10 +781,12 @@ mut:
781781 bfOffBits DWORD
782782}
783783
784- // SYSTEM_INFO contains information on the currently operating system
784+ // RPV_SYSTEM_INFO contains information on the currently operating system
785785// and the underlying hardware. rpv uses it, to obtain the process
786- // architecture.
787- pub struct SYSTEM_INFO
786+ // architecture. We cannot use the original C type C.SYSTEM_INFO here,
787+ // as it is defined already in the vlang stdlib, but with an incomplete
788+ // set of attributes
789+ pub struct RPV_SYSTEM_INFO
788790{
789791 processor_architecture WORD
790792 reserved WORD
@@ -1807,7 +1809,7 @@ pub fn icon_to_bmp(icon HANDLE)! string
18071809pub fn get_process_arch (process_handle HANDLE)! Arch
18081810{
18091811 mut wow64 := false
1810- system_info := SYSTEM_INFO {}
1812+ system_info := RPV_SYSTEM_INFO {}
18111813
18121814 C.GetNativeSystemInfo (& system_info)
18131815
@@ -1979,7 +1981,6 @@ fn C.GetLastError() DWORD
19791981fn C.GetLogicalDrives () DWORD
19801982fn C.GetMappedFileNameA (process_handle HANDLE, addr LPVOID, filename & char, size DWORD) DWORD
19811983fn C.GetModuleFileNameExA (process_handle HANDLE, module_handle_array HANDLE, filename LPSTR, size DWORD) DWORD
1982- fn C.GetNativeSystemInfo (system_info & SYSTEM_INFO)
19831984fn C.GetObject (h HANDLE, c int , pv LPVOID) int
19841985fn C.GetProcessId (process_handle HANDLE) DWORD
19851986fn C.GetSystemDirectoryA (buffer LPSTR, size UINT) UINT
@@ -2017,3 +2018,5 @@ fn C.UuidToStringA(uuid &C.GUID, out_string &&char) int
20172018fn C.VerQueryValueA (data voidptr , block & char, buffer voidptr , size & UINT) bool
20182019fn C.VirtualQueryEx (process_handle HANDLE, address LPVOID, mem_info & C.MEMORY_BASIC_INFORMATION, length SIZE_T) bool
20192020fn C.ZeroMemory (dest PVOID, length u32 )
2021+ fn C.MessageBoxA (window_handle HANDLE, message & char, title & char, uType UINT)
2022+ fn C.ShellExecuteA (window_handle HANDLE, lpOperation & char, lpFile & char, lpParameters & char, lpDirectory & char, nShowCmd u32 ) HANDLE
0 commit comments