Oleander
Oleander
CC#
Created by Oleander on 4/14/2025 in #help
Native AOT Shared Library - Correct Typing for Struct Pointer Parameter
I'm trying to define an exported static method to conform with the following procedure: void retro_get_system_info(struct retro_system_info *info) Currently I'm defining my method as:
public static class RetroEntrypoint
{
[UnmanagedCallersOnly(EntryPoint = "retro_get_system_info")]
public static void RetroGetSystemInfo(nuint info)
{
// ...
}
}
public static class RetroEntrypoint
{
[UnmanagedCallersOnly(EntryPoint = "retro_get_system_info")]
public static void RetroGetSystemInfo(nuint info)
{
// ...
}
}
Is there a better way of typing the info parameter to avoid having to try marshalling the struct within the method?
5 replies