NS_OSVERSIONCHECK callback function (netsh.h)
The NS_OSVERSIONCHECK command is the operating system check function for helpers. This function can be called on a per-function basis, and verifies whether the associated function is supported on the specified operating system. This function is registered within the CMD_GROUP_ENTRY or CMD_ENTRY parameter of the RegisterContext function. The following is an example of an operating system check function. Be aware that SampleOsVersionCheck is a placeholder for the application-defined function name.
Syntax
NS_OSVERSIONCHECK NsOsversioncheck;
BOOL NsOsversioncheck(
[in] UINT CIMOSType,
[in] UINT CIMOSProductSuite,
[in] LPCWSTR CIMOSVersion,
[in] LPCWSTR CIMOSBuildNumber,
[in] LPCWSTR CIMServicePackMajorVersion,
[in] LPCWSTR CIMServicePackMinorVersion,
UINT uiReserved,
[in] DWORD dwReserved
)
{...}
Parameters
[in] CIMOSType
[in] CIMOSProductSuite
[in] CIMOSVersion
[in] CIMOSBuildNumber
[in] CIMServicePackMajorVersion
[in] CIMServicePackMinorVersion
uiReserved
[in] dwReserved
Return value
Returns TRUE of the command or group should be available, FALSE if the command or group should be hidden.
Remarks
Parameters passed by this function are retrieved from WMI. Refer to the latest WMI documentation to obtain these parameter definitions.
The operating system check function is useful for commands used by administrators who manage down-level servers or computers from a more recent version of Windows.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | netsh.h |