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

WritableBytesConst

The WritableByteConst property specifies either the number of bytes of an array or a buffer pointed to by a pointer that can be legally written to. This property is allowed on Pre and Post attributes and can be used on pointer or array data types. The value of this property is a constant of type size_t.

To specify writable bytes that depend on another parameter to the function, use the WritableBytes property.

The following code sample shows how to use the WritableBytesConst property:

// C
#include <CodeAnalysis\SourceAnnotations.h>
void f ([SA_Pre(WritableBytesConst=3)] char *pc);

// C++
#include <CodeAnalysis\SourceAnnotations.h>
using namespace vc_attributes;
void f ([Pre(WritableBytesConst=3)] char *pc);

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.