For compatibility with other languages, Visual Basic. In Visual Basic 6.0 and earlier versions, strings are exported to COM objects as sequences of bytes without a null termination character. Exporting Fixed-Length Strings to Unmanaged Code In such cases, you can use the MarshalAsAttribute attribute to cause managed types to be exposed as unmanaged types. For example, structures in class libraries must specify the BStr unmanaged type on strings sent to COM objects created by Visual Basic 6.0 and earlier versions. Interop assemblies handle most of the work for COM objects, but you may have to control the data types that are used when managed objects are exposed to COM. Interop MarshallingĪt times, you may have to use data types that are not part of the. NET Framework, you may encounter one or more of the following common issues. When you interoperate between COM and the managed code of the.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |