Parameter::ToUInt16 method
Retrieve the value of the parameter as a specific data type.
Syntax
virtual HRESULT ToUInt16(
[out] USHORT *paramValue
) const = 0;
Parameters
-
paramValue [out]
-
The retrieved value of the parameter.
Return value
If the function succeeds, the return value is S_OK.
If the parameter could not be converted into the requested data type, the return value is AXE_E_PARAM_CONVERSION_FAILED.
Remarks
This method returns a type safe value of a parameter. The method checks the underlying data type of the parameter and if the type is not the same as the one requested, or if there is not a mapping, the method returns an error that the conversion failed.
If this returns any error, all the bits of the output value are set to zero or to the empty string, and the value of paramValue is set to false. A non-zero value has a Boolean value of true and a value of zero has a Boolean value of false.
Managed code uses the Parameter.ToUInt16 method.
Requirements
Minimum supported client |
Windows 7 [desktop apps only] |
Minimum supported server |
Windows Server 2008 R2 [desktop apps only] |
Header |
|
DLL |
|