delphi怎麼調用DLL函數(C語言)

來源:互聯網
上載者:User
delphi怎麼調用DLL函數(C語言) Delphi / Windows SDK/API
http://www.delphi2007.net/DelphiAPI/html/delphi_20061109111537269.html
函數原型(C):  
  函數定義:  
  long   GetBasicInfo_Block(LPARAM   pReserved,struct   Log_BASICINFOARRAY   *pLgBas);  
  參數:  
  pReserved:未用  
  pLgBas:基本資料內容(輸出)  
  struct   Log_BASICINFOARRAY{  
  char   bDoc[10];  
  char   bID[18];  
  char   bName[20];  
                    char   bSex;  
  char   bAddress[60];  
  char   bVehicleType[4];  
  char   bTel[16];  
  long   bFirstTestDate;    
  long   bAvailableDate;//   發卡日期,如20041202  
  long   bReleaseDate;//   有效日期,如20041202  
   
  };  
   
   
  在delphi中怎麼引用     Record   怎麼餘struct   對應;(char類型,到delphi中應是怎樣的)  
 

來人救命啊!

Type  
  TLog_BASICINFOARRAY=record  
                    bDoc:array[0..9]   of   Char;  
  bIDA:array[0..17]   of   Char;  
  bName:array[0..19]   of   Char;  
                    bSex:Char;  
  bAddress:array[0..59]   of   Char;  
  bVehicleType:array[0..3]   of   Char;  
  bTel[16]:array[0..15]   of   Char;  
  bFirstTestDate:Double;    
  bAvailableDate:Double;//   發卡日期,如20041202  
  bReleaseDate:Double;//   有效日期,如20041202  
  end;  
   
  function   GetBasicInfo_Block(pReserved:LongInt;pLgBas:PLog_BASICINFOARRAY):Double;stdcall;external   'DLL   name'  
   
  這個試試  
 

Type  
  PLog_BASICINFOARRAY   =   ^TLog_BASICINFOARRAY;  
  TLog_BASICINFOARRAY   =   Packed   Record  
                    bDoc:array[0..9]   of   Char;  
  bIDA:array[0..17]   of   Char;  
  bName:array[0..19]   of   Char;  
                    bSex:Char;  
  bAddress:array[0..59]   of   Char;  
  bVehicleType:array[0..3]   of   Char;  
  bTel[16]:array[0..15]   of   Char;  
  bFirstTestDate:   Longint;    
  long   bAvailableDate:   Longint;//   發卡日期,如20041202  
  long   bReleaseDate:   Longint;//   有效日期,如20041202  
  end;  
   
  function   GetBasicInfo_Block(pReserved:LongInt;pLgBas:PLog_BASICINFOARRAY):integer;stdcall  
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.