On 12/20/2010 11:29 AM, Damian Dixon wrote:
- if (!lpservicestatus)
- {
OSVERSIONINFOW osVi;/* Get windows version emulating */osVi.dwOSVersionInfoSize = sizeof(osVi);GetVersionExW(&osVi);if (osVi.dwPlatformId == VER_PLATFORM_WIN32_NT){if (osVi.dwMajorVersion > 4){SetLastError(ERROR_INVALID_ADDRESS);}else{SetLastError(ERROR_INVALID_PARAMETER);}}return FALSE;- }
You shouldn't need to check the Windows version. Setting the last error to a reasonable value for a particular platform is sufficient.