NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

In/Out Marshaling

Every parameter can optionally have associated with it a setting for it’s IN and OUT attributes. These settings describe the direction that data is intended to flow between the caller and the callee but they have no bearing on the level of indirection used by the parameters. The runtime marshaling infrastructure uses the IN/OUT attributes to decide how each parameter should be marshaled between managed and unmanaged code.

In the absence of explicit IN/OUT settings, the runtime assumes that all by-reference parameters are passed IN/OUT and that all other non by-reference parameters are IN. The only exception is the StringBuilder class, which is also always assumed to be IN/OUT.

Other points concerning marhaling direction:

There are a few classes which are exceptions to the above rules.