see Using Groups with .Net Com Controls Part 1 - code / Interop - ClarionHub
Notice the [StructLayout(LayoutKind.Sequential, Pack = 1)] attribute on the struct
My approach to sending Queues from CW to C#
In Clarion: Serialize to json & put into a MemoryMappedFile (MMF) (using APIs)
Then I RUN my C# EXE
In C#: I read the contents using System.Io.MemoryMappedFiles and a StreamReader
then deserialize using NewtonSoft Json
I used a MMF because I was loading data then RUN()'ing the C# .EXE
For a direct call, I imagine it would be far easier to pass the data as a BSTRING
BTW, this is an interesting subject to many, and seems like it deserves it’s own appropriately titled thread.