Usings SAFEARRAYs with VB.Net
I'm using the BusinessObjects SDK to interact with objects in its repository.
The File Class has methods for sending/receiving (CopyTo and Overwrite) binary data to/from the File Repository Server (where files 开发者_StackOverflowlike Crystal Reports are stored), both of which have an overload that supports 'Binary data (safearray of VT_UI1)'.
While I don't have any experience with SAFEARRAYs, I suspect it isn't equivalent to Byte().
Any guidance, especially with code, is appreciated.
Disclaimer: I don't personally know the BusinessObjects SDK, but the terminology "SAFEARRAY of VT_UI1" is COM, so I'm assuming it's a COM API that you are calling via COM interop.
SAFEARRAY of VT_UI1 is the COM equivalent of Byte()
in .NET, so you should not have a problem marshalling from one to the other; the RCW class should just do it for you.
精彩评论