Avatar of festijazz

asked on 

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

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]

Open in new window

Thank you very much in advance.
Best regards.

Avatar of undefined
Last Comment

8/22/2022 - Mon