C + + :
Struct IPSWINFO
{
Char * version;
Int index;
Char * url;
Uint64_t totalSize;
};
DLLIMPORT int get_ipsw_files (struct IPSWINFO * * IPSWINFO, int * num);
C # :
Disclaimer:
Public struct IPSWINFO {
///char *
[MarshalAs (UnmanagedType. LPStr)]
Public string version;
///int
Public int index;
///char *
[MarshalAs (UnmanagedType. LPStr)]
Public string url;
///uint64_t
Public long totalSize;
}
[DllImport (" idevicerestore. DLL ", CallingConvention=CallingConvention Cdecl)]
Public static extern int get_ipsw_files (ref IPSWINFO [] ps, ref int num);
Call:
IPSWINFO [] iPSWINFOs;
NativeMethods. Get_ipsw_files (ref iPSWINFOs, ref j);
In a program called, can only get the IPSWINFOs array first, should have had two?? !!!!!
To solve the
CodePudding user response:
///uint64_tPublic long totalSize;
Here try public UInt64 totalSize