Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The NullTerminated property specifies that either the last usable element of an array or buffer pointed to by a pointer contains the value zero. This property can be used with Pre and Post attributes. It is allowed on T* and T [], where T is of integral or pointer type.
The NullTerminated property must be set using one of the following values:
SA_Yes - the array is null terminated.
SA_No - the array is not null terminated.
SA_Maybe - the array may be null terminated.
Note
In C++, the SA_ prefix is optional.
Example
The following code shows how to use the NullTerminated property:
// C
#include <CodeAnalysis\SourceAnnotations.h>
void f([SA_Pre(NullTerminated=SA_Yes)] char* pc);
// C++
#include <CodeAnalysis\SourceAnnotations.h>
using namespace vc_attributes;
void f([Pre(NullTerminated=Yes)] char* pc);
NullTerminated property cannot be applied to a function pointer.