初始化 SUSI API dll 失败

发布于 2025-01-18 07:21:54 字数 1169 浏览 0 评论 0原文

我正在尝试使用提供给我的Susi API DLL。根据他们的文件,第一步是致电Susilibinitialize。当调用它时,当我期望获得SUSI_STATUS_Initialized作为结果时,我似乎只会从功能中获得故障结果。

我在C ++ DLL方面没有太多经验,但是其他几篇文章和帖子似乎在下面做到了。我还尝试在功能声明中传递外部函数的名称。我是错误地称其为DLL的问题吗?他们提供的应用程序(封闭式)能够正确使用它。

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;

”在此处输入图像说明”

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;

enter image description here

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烟火散人牵绊 2025-01-25 07:21:54

在发布问题之前,我从未想过这可能是硬件要求。发布问题后,我突然想到在机器本身上运行它,它在那里工作。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文