-
Notifications
You must be signed in to change notification settings - Fork 36
Closed
Description
I was making a process for getting the type of windows the software was on. Windows 10, Windows server 2016, etc. When I tried to use the method provided on the microsoft documentation. It gave a type error. The paremeter I gave wasn't correct. LPOSVERSIONINFO didn't work nor did OSVERSIONINFO.addr work. I looked in the code and found why. There was no GetVersionExA that accepted LPOSVERSIONINFO. So I added it and it works now.
proc GetVersionExA*(lpVersionInformation: LPOSVERSIONINFOEXA): WINBOOL {.winapi, stdcall, dynlib: "kernel32", importc: "GetVersionExA".}# This works when I added GetVersionExA
var osvi: OSVERSIONINFO
discard GetVersionExA(osvi.addr)Metadata
Metadata
Assignees
Labels
No labels