С++ кодогенратора структура выглядит так:
#cpp
typedef struct {
short int major;
short int minor;
short int build;
} THiAsmVersion;
//Функция так:
DLLIMPORT int CheckVersionProc(THiAsmVersion *params) {
CG_LOG_BEGIN
//if ((params->major >= 3) && (params->minor >= 63) && (params->build >= 162))
//return CG_SUCCESS;
CG_LOG_RETURN(CG_SUCCESS)
}
#pas
THiAsmVersion = record
major:word;
minor:word;
build:word;
end;
public struct THiAsmVersion{
public ushort major;
public ushort minor;
public ushort build;
};
...
[DllImport(@"C:/Program Files (x86)/HiAsm_AltBuild/Elements/Android/CodeGen.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
private static extern int CheckVersionProc(THiAsmVersion Params);
...
THiAsmVersion t = new THiAsmVersion();
t.build = 4;
t.major = 4;
t.minor = 4;
CheckVersionProc(t);
Подскажите где ошибка?