Skip to content

Add GetVersionExA #57

@Techno-Fox

Description

@Techno-Fox

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions