How Data Types are Marshaled

Simply put, the Microsoft VM evaluates Java arguments, then converts them to native C++ types. The Microsoft VM infers the native type of each parameter and the return value from the declared (compile-time) Java type of the parameter. For example, a parameter declared as a Java integer is passed as a 32-bit integer; a parameter declared as a Java String object is passed as a null-terminated string, and so forth. There are no invisible attributes that provide information about the native types. In Java, what you see is what you get.

The following topics describe in detail how the Java data types map to native data types: