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
我自己根据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