Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all articles
Browse latest Browse all 1710

ComInterop pass managed float[] as ref float

$
0
0

I have a ComInterop method with the signature in managed code (C#) ofvoid Foo(ref SOME_ENUM, ref float, ref int) where SOME_ENUM is a .NET enum

The actual unmanaged code wants fixed size arrays for the SOME_ENUM, float, and int parameters.

I used midl.exe and tlbimp.exe to create the managed wrapper dll.

How can I pass float[], enum[], int[] as a ref float, ref int, ref enum to unmanaged code?

I can't cobble together the [ComImport] for the library by hand because there are a massive amount of classes in the library.

 



Viewing all articles
Browse latest Browse all 1710

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>