The signature of SQLInstallerError is defined as
(UInt16, Ref{UInt16}, Ptr{UInt8}, UInt16, Ref{UInt16})
while ODBC API Reference specifies it as
RETCODE SQLInstallerError(
WORD iError,
DWORD * pfErrorCode,
LPSTR lpszErrorMsg,
WORD cbErrorMsgMax,
WORD * pcbErrorMsg);
The second argument has the type DWORD *, which corresponds to Ref{UInt32} rather than Ref{UInt16}.
Similarly, Ref{UInt16} is incorrectly used for a DWORD * argument in SQLInstallDriverEx and SQLRemoveDriver.