delphi中调用vc dll的问题?

joinrry joinrry 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
代码如下:

tgettime = function ( var sSourceFile:array of char;
var sDestinationFile:array of char;
IsOverCast:boolean;
usInputFlowRate:byte;
usOutputPCMLAW:byte;
var sErrorCodeBuffer:array of char;
bReserved:byte):boolean;

var
errorbuf,SourceFile,DestinationFile:array[0..511] of char;
other:byte;
libhandle :integer;
begin
SourceFile := 'D:\1.voc';
DestinationFile := 'd:\12.wav';
LibHandle:=LoadLibrary('adpcmdll.DLL');
if LibHandle=0 then
begin
Application.MessageBox('无此文件','警告',mb_ok+64);
exit;
end;
try
@Pcm2Wav:=GetProcAddress(LibHandle,'HU_AdpcmToWav');
if not(@Pcm2Wav=nil) then
Pcm2Wav(sourcefile,destinationfile,true,24,1,errorbuf,other);
finally
FreeLibrary(LibHandle);
end;

end;


调试时到Pcm2Wav(sourcefile,destinationfile,true,24,1,errorbuf,other)报写错误,不知道是什么原因,请教各位老大。
...全文
评论 5
收藏 已收藏
分享
返回顶部
joinrry
Delphi 5,944 成员 262,941 内容