'Is there a way to get multiple parameters back from an interop call in nanoFramework

I am trying to get multiple parameters from a struct in a single interop call. The struct in question has the following signature:

struct struct_name
{
    uint16_t param0;
    uint8_t param1;
    uint8_t param2;
    uint8_t *param3;
};

and I am trying to get all of these parameters into managed c# code.



Solution 1:[1]

That's an "advanced" usage scenario that's not supported currently. Only base CLR types can be used in Interop. You have to have those as individual params passed with ref.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 José Simões