Com Variant Marshalling Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bob

    #1

    Com Variant Marshalling Question

    I have been trying to us an unmanaged dll for a while now with no good
    results. Most of the dll methods i can use and have been. I however
    have a problem with this one. I am supposed to ref 15 objects as the
    following type.

    This is one of the 15 variables i am using.

    [MarshalAs(Unman agedType.SafeAr ray | UnmanagedType.I 4)]
    object secondaryFieldS coreDataSA = new int [8];

    private myMethod()
    {
    int i = failedMethod(re f secondaryFieldS coreDataSA,ref ...);
    ...............
    }

    I keep getting an invalid param used. I have contacted the company
    that created the dll and they had me try using the .SafeArray | I4 and
    it still doesn't work. I have tried almost everything. I am missing
    something. I visual studio it is asking for 15 ref objects and in the
    documentation from the vendor it should be returned as an array of
    type long items. Any help is greatly appreciated.


    Need Help,
    Bob;
Working...