我的DLL在VC中是这样导出的:
extern "C" _declspec(dllexport) short int * _stdcall packcap(int AdapterID)不知道在DELPHI中我该如何声明?
最好帮我写段小程序,来测试下是否可以调用,谢谢!

解决方案 »

  1.   

    另:我在VC中调用这DLL,没有问题,VC代码如下:
    // TODO: Add your control notification handler code here
    CString m_str,temp;
    short int * p;
    int a=2;
    p=packcap(a);
    for(int i=0;i<1000;i++)
    {
    m_str.Format("%d",*(p+i));
    temp+=m_str;
    } MessageBox(temp); //SetTimer(1,1000,NULL);
    谁帮我把上面代码转换成DELPHI代码,谢谢!(注:我重要是想得到指针p指向的地址段的内容)
      

  2.   

    声明
    function packcap(AdapterID: integer): smallint
      

  3.   

    刚才看错了,不好意思type 
      ps = ^smallint;var
      function packcap(AdapterID: integer): psm_str,temp: string;
    p: ps
    i, a: integer
    p = packcap(a);for i := 0 to 1000 -1 do
    begin
      
    end;