代码如下: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)报写错误,不知道是什么原因,请教各位老大。

解决方案 »

  1.   

    eaccessviolation异常,写错误!在线等待!
      

  2.   

    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;
    在vc中的原型是什么呢?
    第一个参数,如果是char*型的,应该用pchar,我不知道用var sSourceFile:array of char;是否正确。