I have searched this up rather a lot, but come up with no helpful results.
I am currently trying to program simple DirextX game for Windows 8 Metro, and have come across _In_
rather a lot. I'm just wondering what it is.
Also, I have seen a lot of the use of ^
as the pointer *
which I found odd. On top of this, some classes have an interface of ref class MyClass
, which I believe is for C# legibility.
Anyway, any help would be brilliant.
Example: The _In_ Annotation The _In_ annotation indicates that: The parameter must be valid and will not be modified. The function will only read from the single-element buffer. The caller must provide the buffer and initialize it. _In_ specifies "read-only".
SAL is the Microsoft source code annotation language. By using source code annotations, you can make the intent behind your code explicit. These annotations also enable automated static analysis tools to analyze your code more accurately, with significantly fewer false positives and false negatives.
* sal.h provides a set of annotations to describe how a function uses its. * parameters - the assumptions it makes about them, and the guarantees it makes. * upon finishing.
It is a SAL annotation, used for code analysis. The annotations themselves are defined as macros that, in normal builds, expand to nothing.
The ^
and ref class
are features of C++/CX, a set of language extensions developed to make it easier to build Metro style apps for Windows 8 in C++. Neither is a part of standard C++. The documentation (linked previously) has links to tutorials and references describing the language extensions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With