I just played around with Delphi and libchdr and had a problem with data alignment as chd_header was 200 with Visual Studio and 196 in Delphi.
Disabling alignment for the data structures in chd.h fixed the problem.
#pragma pack(push, 1)
...
#pragma pack(pop)