看到篇一个新的IP数据格式:ipwry
http://blog.csdn.net/cnss/archive/2004/10/14/ipwry.aspxipsearcher.dll新增了几个导出函数:
void* __cdecl GetAddressInt(unsigned int ip);
功能同_GetAddress,参数IP是整型而不是字符串,字节序为little-endian.
bool __cdecl Reload();
重新加载ipwry.dat,适用于网站统计程序不间断运行的升级IP数据.
unsigned int __cdecl IPCount();
返回有多少条IP
char* __cdecl DateTime();
返回数据生成的日期时间不知道这个:void* __cdecl GetAddressInt(unsigned int ip);函数怎么调用???
下面两个道会了.
function IPCount(): Integer; stdcall; external 'ipsearcher.dll';
function DateTime(): PChar; stdcall; external 'ipsearcher.dll';

解决方案 »

  1.   

    试试吧...没多大把握……
    procedure GetAddressInt(ip :Longint);cdecl;external 'ipsearcher.dll';
      

  2.   

    cdecl,是什么?
    试了没反应???怪怪!
      

  3.   

    function _GetAddress(ip :string):PChar;cdecl;external 'IPSearcher1.dll';
    我这样调了一下,但反回来的是个乱码....
    不懂呀!
      

  4.   

    没看到前面的*...这样试试...对C不熟哪...返回一个无类型的指针 ??function GetAddressInt(ip :Longint):Pointer;cdecl;external 'ipsearcher.dll';
      

  5.   

    cdecl 是调用函数的一种方法,调用该方法时,参数按照从右->左的顺序进行传递The cdecl convention is useful when you call functions from DLLs written in C or C++。
    你用UINT类型的参数来试试看!
      

  6.   

    谢谢两位啦,但不行也,都返回了这个东东:€D
      

  7.   

    问题是
    你参数对了吗?
    你传的是什么类型呢?
    输入的是什么?
    是int型吗?
      

  8.   

    回楼上的:
    function GetAddressInt(ip :Longint):Pointer;cdecl;external 'ipsearcher.dll';
    ...
    Edit3.Text := string(GetAddressInt(3658823702));
    这样没错吧?
    (218*256*256*256)+(21*256*256)+(56*256)+(22)=3658823702