I'm attempting to use the SUSI api dll that was provided to me. The first step according to their documentation is to call SusiLibInitialize. When calling it I seem to only get the failure result from the function when I'm expected to get SUSI_STATUS_INITIALIZED as the result.
I do not have much experience with c dlls however several other articles and posts seems to do it as down below. I've also tried passing the name of the external function in the function declaration. Am I calling it incorrectly or could this be a issue with the DLL? The application they provided (closed sourced) is able to use it correctly.
const
SUSI_DLL = 'Susi4.dll';
SUSI_STATUS_NOT_INITIALIZED = $FFFFFFFF;
SUSI_STATUS_INITIALIZED = $FFFFFFFE;
SUSI_STATUS_SUCCESS = $0;
function SusiLibInitialize: UInt32; stdcall; external SUSI_DLL;
{$R *.fmx}
procedure TForm1.btnTestClick(Sender: TObject);
begin
var
result := SusiLibInitialize;
if result = SUSI_STATUS_INITIALIZED then
ShowMessage('Init')
else if result = SUSI_STATUS_SUCCESS then
ShowMessage('Success')
else if result = SUSI_STATUS_NOT_INITIALIZED then
ShowMessage('Failure');
end;
CodePudding user response:
Before posting the question I never thought that it might be a hardware requirement. After posting the question I suddenly had the idea to run it on the machine itself it works there.