Export (0) Print
Expand All

3.1.4.1.6 Standard Parameter Validation

The implementation MUST apply the following validation rules to all parameters unless more specific statements appear in the individual method sections.

Term used to describe parameter

Required validation

X MUST be a non-NULL pointer to a string.

Verify that X is not NULL. If that verification fails, return ERROR_INVALID_PARAMETER.

X MUST be A.

Verify that X is A. If that verification fails, return ERROR_INVALID_PARAMETER.

X MUST be a value from A through B, inclusive.

Verify that X is a value that is greater than or equal to A and less than or equal to B. If that verification fails, return ERROR_INVALID_PARAMETER.

X MUST NOT be A.

Verify that X is a value that is not A. If that verification fails, return ERROR_INVALID_PARAMETER.

X MUST be one of <list>.

Verify that X is a value that is a member of <list>. If that verification fails, return ERROR_INVALID_PARAMETER.

X MUST be the result of a bitwise OR of zero or more of the flags in <list>.

If <list> contains the statement "All other bits MUST be zero", verify that the only bits that are set are those that are specified in <list>. If that verification fails, return ERROR_INVALID_PARAMETER.

X MUST be the result of a bitwise OR of one or more of the flags in <list>.

Verify that at least one of the bit flags from <list> is set and if that verification fails, return ERROR_INVALID_PARAMETER. If <list> contains the statement "All other bits MUST be zero", verify that the only bits that are set are the bits that are specified in <list>. If that verification fails, return ERROR_INVALID_PARAMETER.

 
Show:
© 2015 Microsoft