[go-nuts] Re: Please help me with structure data alignment

2022-11-24 Thread Maxim Velivanov
My bad. it turns out that the API dll has a directive #pragma pack (1) On Thursday, November 24, 2022 at 7:08:54 AM UTC+2 Maxim Velivanov wrote: > Hi, > > I'm developing a Go wrapper for a dll. > dll contains the following structure: > struct ck_version { > unsigned c

[go-nuts] Please help me with structure data alignment

2022-11-23 Thread Maxim Velivanov
Hi, I'm developing a Go wrapper for a dll. dll contains the following structure: struct ck_version { unsigned char major; unsigned char minor; }; struct ck_info { struct ck_version cryptoki_version; unsigned char manufacturer_id[32]; ck_flags_t flags; unsigned char library_description