Hello,
I am making a class library in C#. The purpose of this library is to receive a struct as input (from other C program which is written in LabWindows), recognize its members and return a string which is built using these members.
For e.g.
The struct is:
The function in C# should look like this:Code:typedef struct { uint32_t Weight; double Velocity; }UCAPP_Property_t;
Since I can not use pointer in C#, I have no idea how to do this. I have to do this in C# because of existing library which is in C#.Code:public CreateWriteString(void* aPointerToStruct, string writeString) { for(int i = 0; i < numberOfElements in aPointerToStruct; i++) writeStringBuilder.Append(ToString(*(aPointerToStruct + i)); writeString = writeStringBuilder.ToString(); }
Regards
RB




Reply With Quote