What is _In_ in C++?

Viewed 27631

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.

4 Answers

In sal.h file o found this definition

// Input parameters --------------------------

//   _In_ - Annotations for parameters where data is passed into the function, but not modified.
//          _In_ by itself can be used with non-pointer types (although it is redundant).

// e.g. void SetPoint( _In_ const POINT* pPT );
#define _In_                            _SAL2_Source_(_In_, (), _Pre1_impl_(__notnull_impl_notref) _Pre_valid_impl_ _Deref_pre1_impl_(__readaccess_impl_notref))
#define _In_opt_                        _SAL2_Source_(_In_opt_, (), _Pre1_impl_(__maybenull_impl_notref) _Pre_valid_impl_ _Deref_pre_readonly_)
Related