我原来用C++写的一个DLL,其中一个函数的类型是:
bool startPlayFile(char *filePath, bool openPlay,long volume,bool replay)delphi调用的时候是
startPlayFile(filePath:Pchar;openPlay:Boolean;volume:integer;replay:Boolean):Boolean;现在我要使用COM组件,应如何写那些类型呢?谢谢!
bool startPlayFile(char *filePath, bool openPlay,long volume,bool replay)delphi调用的时候是
startPlayFile(filePath:Pchar;openPlay:Boolean;volume:integer;replay:Boolean):Boolean;现在我要使用COM组件,应如何写那些类型呢?谢谢!
[...] // GUID
function StartPlayFile(const filePath: WideString; volume: Integer; replay: WordBool): HResult; stdcall;
end;WideString和COM里面的BSTR兼容,你可以去看看MSDN和Delphi的帮助文档。