一个c++编写的dll中,有两个版本的函数,一个是GetTextA,一个是GetTextW,我现在想一个GetText正确调用这两个函数
在c++中可以
#ifdef unicode
#define GetText GetTextW
#else
#define GetText GetText A
在delphi中怎样搞?

解决方案 »

  1.   

    delphi 又不能一个编译器同时编译 unicode 和非 unicode 版的程序,这对 delphi 来说没啥意义
      

  2.   

    procedure GetText;stdcall ;external 'ABC.dll'; 
      

  3.   

    但我这么写:Function GetText(hdc:HDC;rect:PRECT;Astr:Pchar):Boolean;stdcall;external 'EDRLIB.DLL';
    出现无法定位到GetText于动态链接库Edrlib.dll上的错误啊..
      

  4.   

    检查'EDRLIB.DLL'是否导出GetText函数!
      

  5.   

    如2L所说,另外也可以直接loadlibrary动态调用DLL当中的函数
      

  6.   

    c++的dll的导出函数是我说的有两个啊,一个是GetTextA,另一个是GetTextW,在delphi调用时,
    Function GetTextA(hdc:HDC;rect:PRECT;Astr:Pchar):Boolean;stdcall;external 'EDRLIB.DLL'; 
    我试过这样是能正确调用的我只是不想用GetTextA函数名,想用GetText作为函数名