C#
面向物件且類型安全的程式設計語言,其根系於 C 系列語言,並包含元件導向程式設計的支援。
11 個問題
In C#, I imported the C DLL through LoadLibrary.
In .net3.5 I used Marshal.PtrToStructure to convert the pointer back to the structure
I successfully get int map_num equal to 1
But when I run .net4.8, I get 0x00007ffb. Why is this?
public struct _map_name_usr_param_t
{
public IntPtr ver_str;
public UInt32 ver;
}
[StructLayout(LayoutKind.Sequential, Pack = 2)]
public struct _map_list_usr_param_t
{
public int map_num;
[MarshalAs(UnmanagedType.ByValArray)]
public _map_name_usr_param_t[] maps;
}