PInvoke allows you to over-ride the default marshaling provided for function return values, for function arguments, and for fields within structs used as function arguments. For example, if you want a managed String marshaled, not to an LPTSTR (the default), but to a an LPBSTR, this is possible by saying so in the metadata.
However, as of this release, neither VC7 nor VB7 expose this feature to their users. This spec will be updated to include the relevant syntax once it becomes available.
For a full description of how PInvoke (and COM Interop) data is marshaled, see the “Data Marshaling” Spec.