构造体数组的传递

结构体数组的传递我用VB.net调用VC编写的一个OCX。VC的OCX中一个接口的参数类型是long*,这个long*实际上是

结构体数组的传递
我用VB.net调用VC编写的一个OCX。VC的OCX中一个接口的参数类型是long*,这个long*实际上是一个结构体数组。如下:


LONG GetInfo(LONG nOption, LONG* rcBound);

其中的LONG* rcBound转换到VC其实是

 RECT* pRect = (RECT*)rcBound

我在VB.net声明结构体为:

    Structure RECT
        Dim left As Integer
        Dim top As Integer
        Dim right As Integer
        Dim bottom As Integer
    End Structure

VB.net中的方法类型为:

Public Overridable Function GetInfo(ByVal nOption As IntegerByRef rcBound As Integer) As Integer

请问怎么把参数传递进去?

[解决办法]
试试 Marshal.StructureToPtr
[解决办法]
试试将参数声明为 intptr类型,然后用楼上的办法转换传入