By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,333 Members | 1,389 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,333 IT Pros & Developers. It's quick & easy.

Com Variant Marshalling Question

P: n/a
Bob
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(UnmanagedType.SafeArray | UnmanagedType.I4)]
object secondaryFieldScoreDataSA = new int [8];

private myMethod()
{
int i = failedMethod(ref secondaryFieldScoreDataSA,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;
Nov 13 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.