I have heard this concept used frequently, but I don\'t have a really good grasp of what it is.
Marshalling is the conversion between a native type in c++ (HTMLElement, const wchar_t*) and the internal runtime representation that the virtual machine library in c++ uses (JSObject, MonoString etc.) to represent the virtual type / managed type that is visible to JS/C# etc. scripts running on the virtual machine (HTMLElement, System.String). P/Invoke performs automatic marshalling. Passing a System.String to a native call using P/Invoke causes a const wchar_t* to be passed to the native call as automatic marshalling takes place. When you use internal calls however, it will be passed as a MonoString, which the c++ function will have to marshal itself and then marshal whatever it needs to return to an internal runtime return type. Only blittable types don't need to be marshalled when using internal calls, for instance, int, which is a System.Int32 is passed as a gint32, which is just an int.