troubleshooting Question

[Help] C#: Marshalling of a structure with a float array field.

Avatar of festijazz
festijazz asked on
1 Comment1 Solution129 ViewsLast Modified:
Hello Everyone,

I have a question about the marshalling of a structure with a float array field defined.
How should I defined the marshalling type ?

        private const int _LIMIT_ROWS = 128;
        private const int _LIMIT_COLS = 2;

        private struct stBNC
            public int Rows;

            public int Cols;

            [[b]MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)]
            public float[_LIMIT_ROWS * _LIMIT_COLS] Level;[/b]

Thank you very much in advance.
Best regards.

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros