初始化 SUSI API dll 失败
我正在尝试使用提供给我的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;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在发布问题之前,我从未想过这可能是硬件要求。发布问题后,我突然想到在机器本身上运行它,它在那里工作。
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.