使用方法:
    本DLL只有两个函数,函数原型如下:
    //获得拼音
    //参数依次为: 拼音缓存区,要转换的字符,分隔符
    BOOL WINAPI GetPinYin(PCHAR pBuf,PCHAR pStr,PCHAR pSeparator)implementation
procedure GetPinYin(pbuf:string;pStr:string ;pSeparator:string ); cdecl StdCall; external 'PinYin.dll';{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
var pbuf:string;
begin
 getpinyin(pbuf,edit1.text,' ') ;
 showmessage(pbuf);
end;出错提示如下:
project project1.exe raised exception class eaccessviolation with message 'access violation at address 100013A0 in module 'pinyin.dll'. write of address 00000000'.process stopped.use step or run to continue.

解决方案 »

  1.   

    procedure GetPinYin(pbuf:string;pStr:string ;pSeparator:string ); exports
      

  2.   

    procedure GetPinYin(pbuf:Pchar;pStr:Pchar;pSeparator:Pchar); cdecl StdCall; external 'PinYin.dll';
      

  3.   

    zhlwyy(海龙)可讲得详细些,如这句替换我原来的话则连编译都能不过
     IwantFlay(我很爱她!!!!!!!!!!) 的方法和我原来的是出现同一错误
      

  4.   


    function GetPinYin(pBuf, pStr, pSeparator :PChar):BOOL;stdcall;external 'PinYin.dll';
      

  5.   

    procedure GetPinYin(pbuf:Pchar;pStr:Pchar;pSeparator:Pchar); cdecl StdCall; external 'PinYin.dll';