Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic


warning C6506: invalid annotation: <name> property may only be used on values of pointer or array types

This warning indicates that a property is used on a type other than pointer or array types. The Access, Tainted, and Valid properties can be used on all data types. Other properties, such as ValidBytesConst, ValidElementsConst, ElementSize, and NullTerminted support pointer, pointer to members, or array types. For a complete list of properties and the supported data types, see Annotation Properties.

The following code generates this warning:

void f(_Out_ char c)
    c = 'd';

To correct this warning, use a pointer or an array type, as shown in the following sample code:

void f(_Out_ char *c)
    *c = 'd';
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.