See Also: BStrWrapper Members
The System.Runtime.InteropServices.BStrWrapper class controls how the wrapped object is marshaled when passed as VARIANT. You can wrap a string object in a System.Runtime.InteropServices.BStrWrapper object to marshal it as VT_BSTR. System.Runtime.InteropServices.BStrWrapper is useful when passing a null string to unmanaged code. Without System.Runtime.InteropServices.BStrWrapper, a null string is passed as VT_EMPTY; however, wrapping the string with System.Runtime.InteropServices.BStrWrapper ensures that the null string is passed as VT_BSTR.