windows.c |
Get the OS release version.
This uses [`GetVersionEx`] internally.
Depending on how the application is compiled
it might return different values for the same operating system.
On Windows 10 the example will return the Windows 8 OS version value `6.2`.
If compiled into an application which explicitly targets Windows 10, it will
return `10.0`.
[`GetVersionEx`]: https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getversionexa
## Arguments
* `outbuf` - Pointer to an allocated buffer of size `outlen`.
The OS version will be written here, null-terminated.
If the version is longer than the buffer it will be truncated.
* `outlen` - Size of the buffer.
## Return value
Returns the number of bytes written.
|
2338 |