谁能帮俺声明个DLL接口单元?(100分)

  • 主题发起人 主题发起人 zhbzhb
  • 开始时间 开始时间
Z

zhbzhb

Unregistered / Unconfirmed
GUEST, unregistred user!
现有一块研祥公司的数据采集卡,程序包中只有VC++及VB接口,VB接口声明如下,
我自己根据VB的声明,作了个Delphi的声明,用起来总是不放心,有那位高手帮俺
在重新声明一个Pascal接口,让俺作个对照.
-------------- 818 L/HG Functions Decalerations --------------
Declare Function W_818_Initial Lib "818.dll" (ByVal card_number As Long, ByVal base_address As Long) As Long
Declare Function W_818_Switch_Card_No Lib "818.dll" (ByVal card_number As Long) As Long
Declare Function W_818_DI Lib "818.dll" (ByVal port_number As Long, di_data As Byte) As Long
Declare Function W_818_DI_Channel Lib "818.dll" (ByVal ch_no As Long, di_data As Long) As Long
Declare Function W_818_DO Lib "818.dll" (ByVal port_number As Long, ByValdo
_data As Byte) As Long
Declare Function W_818_DA Lib "818.dll" (ByVal ch_no As Long, ByVal da_data As Long) As Long
Declare Function W_818_AD_Set_Channel Lib "818.dll" (ByVal ch_no As Long) As Long
Declare Function W_818_AD_Set_Range Lib "818.dll" (ByVal range As Long) As Long
Declare Function W_818_AD_Set_Mode Lib "818.dll" (ByVal ad_mode As Long) As Long
Declare Function W_818_AD_Soft_Trig Lib "818.dll" () As Long
Declare Function W_818_AD_Aquire Lib "818.dll" (ad_data As Long) As Long
Declare Function W_818_CLR_IRQ Lib "818.dll" () As Long
Declare Function W_818_AD_DMA_Start Lib "818.dll" (ByVal ad_ch_no As Long, ByVal ad_gain As Long, ByVal dma_ch_no As Long, ByVal irq_ch_no As Long, ByVal count As Long, ad_buffer As Integer, ByVal c1 As Long, ByVal c2 As Long) As Long
Declare Function W_818_AD_DMA_Status Lib "818.dll" (status As Long, count As Long) As Long
Declare Function W_818_AD_DMA_Stop Lib "818.dll" (count As Long) As Long
Declare Function W_818_AD_INT_Start Lib "818.dll" (ByVal ad_ch_no As Long, ByVal ad_gain As Long, ByVal irq_ch_no As Long, ByVal count As Long, ad_buffer As Integer, ByVal c1 As Long, ByVal c2 As Long) As Long
Declare Function W_818_AD_INT_Status Lib "818.dll" (status As Long, count As Long) As Long
Declare Function W_818_AD_INT_Stop Lib "818.dll" (count As Long) As Long
Declare Function W_818_AD_Timer Lib "818.dll" (ByVal c1 As Long, ByVal c2 As Long) As Long
Declare Function W_818_Timer_Start Lib "818.dll" (ByVal timer_mode As Long, ByVal c0 As Long) As Long
Declare Function W_818_Timer_Read Lib "818.dll" (counter_value As Long) As Long
Declare Function W_818_Timer_Stop Lib "818.dll" (counter_value As Long) As Long
Declare Function W_818_AD_Input_Mode Lib "818.dll" (ByVal channel_mode As Long) As Long
 
闲来无事,助人为乐:
function W_818_Initial( card_number : longint;
base_address : longint ) : longint;
function W_818_Switch_Card_No( card_number : longint ) : longint;
function W_818_DI( port_number : longint;
var di_data : byte ) : longint;
function W_818_DI_Channel( ch_no : longint;
var di_data : longint ) : longint;
function W_818_DO( port_number : longint;
do_data : byte ) : longint;
function W_818_DA( ch_no : longint;
da_data : longint ) : longint;
function W_818_AD_Set_Channel( ch_no : longint ) : longint;
function W_818_AD_Set_Range( range : longint ) : longint;
function W_818_AD_Set_Mode( ad_mode : longint ) : longint;
function W_818_AD_Soft_Trig : longint;
function W_818_AD_Aquire( var ad_data : longint ) : longint;
function W_818_CLR_IRQ : longint;
function W_818_AD_DMA_Start( ad_ch_no : longint;
ad_gain : longint;
dma_ch_no : longint;
irq_ch_no : longint;
count :
longint;
var ad_buffer : integer;
c1 : longint;
c2 : longint ) : longint;
function W_818_AD_DMA_Status( var status : longint;
var count : longint ) : longint;
function W_818_AD_DMA_Stop( var count : longint ) : longint;
function W_818_AD_INT_Start( ad_ch_no : longint;
ad_gain : longint;
irq_ch_no : longint;
count : longint;
var ad_buffer :
integer;
c1 : longint;
c2 : longint ) : longint;
function W_818_AD_INT_Status( var status : longint;
var count : longint ) : longint;
function W_818_AD_INT_Stop( var count : longint ) : longint;
function W_818_AD_Timer( c1 : longint;
c2 : longint ) : longint;
function W_818_Timer_Start( timer_mode : longint;
c0 : longint ) : longint;
function W_818_Timer_Read( var counter_value : longint ) : longint;
function W_818_Timer_Stop( var counter_value : longint ) : longint;
implementation
function W_818_Initial;
external '818.dll';
function W_818_Switch_Card_No;
external '818.dll';
function W_818_DI;
external '818.dll';
function W_818_DI_Channel;
external '818.dll';
function W_818_DO;
external '818.dll';
function W_818_DA;
external '818.dll';
function W_818_AD_Set_Channel;
external '818.dll';
function W_818_AD_Set_Range;
external '818.dll';
function W_818_AD_Set_Mode;
external '818.dll';
function W_818_AD_Soft_Trig;
external '818.dll';
function W_818_AD_Aquire;
external '818.dll';
function W_818_CLR_IRQ;
external '818.dll';
function W_818_AD_DMA_Start;
external '818.dll';
function W_818_AD_DMA_Status;
external '818.dll';
function W_818_AD_DMA_Stop;
external '818.dll';
function W_818_AD_INT_Start;
external '818.dll';
function W_818_AD_INT_Status;
external '818.dll';
function W_818_AD_INT_Stop;
external '818.dll';
function W_818_AD_Timer;
external '818.dll';
function W_818_Timer_Start;
external '818.dll';
function W_818_Timer_Read;
external '818.dll';
function W_818_Timer_Stop;
external '818.dll';
 
接受答案了.
 
后退
顶部