Attribute VB_Name = "DeclareFunctions"
Option Explicit

'Functions for software
Public Declare Function sdGetDataSleep Lib "SDK2250DLL.dll" (Controlstate As ControlData) As Integer
Public Declare Function sdMainPanelDrawGrid Lib "SDK2250DLL.dll" (ByVal hdc As Long, view_data As PictureRange) As Integer
Public Declare Function sdGetScrollData Lib "SDK2250DLL.dll" (ByVal DeviceIndex As Integer, Controlstate As ControlData, levers As LeversData, TimeState As TimeStruct, ByVal Ch1Voltage As Integer, ByVal Ch2Voltage As Integer, Ch1ScrollData As Integer, Ch2ScrollData As Integer, Ch1DisplayData As Integer, Ch2DispalyData As Integer, ByVal TriggerPosition As Integer, ByVal Ch1InGND As Boolean, ByVal Ch2InGND As Boolean) As Integer
Public Declare Function sdDisplaySampling Lib "SDK2250DLL.dll" (ByVal Ch1Enabled As Boolean, ByVal Ch2Enabled As Boolean, ByVal TriggerSource As Integer, ByVal TIMEBASE As Integer, ByVal BufferSize As Integer, Time As Double) As Double
Public Declare Function sdChannelDataBuffer Lib "SDK2250DLL.dll" (Controlstate As ControlData, ByVal InterpolationLineMode As Integer, chbufferdata As Integer, chhardwaredata As Integer) As Integer
Public Declare Function sdGetDisplayData Lib "SDK2250DLL.dll" (Controlstate As ControlData, chdisplaydata As Integer, chbufferdata As Integer) As Integer
Public Declare Function sdDisplayData Lib "SDK2250DLL.dll" (ByVal hdc As Long, view_data As PictureRange, ByVal isLine As Integer, data_tab_ch1 As Integer, CH_color As LineColor) As Integer
Public Declare Function sdChannelInGND Lib "SDK2250DLL.dll" (ByVal chposition As Integer, data_gra_chx As Integer) As Integer
Public Declare Function sdAutoset Lib "SDK2250DLL.dll" (ByVal DeviceIndex As Integer, Controlstate As ControlData, AutosetData As AutosetDataStruct, FiltAndTrigger As StateStruct, levers As LeversData, level As Integer) As Integer

Public Declare Function sdSoftFindTriggerPoint Lib "SDK2250DLL.dll" (ByVal nHTriggerPosition As Integer, ByVal TIMEBASE As Integer, ByVal TriggerLever As Integer, ByVal TriggerSlope As Integer, BufferData As Integer) As Integer
Public Declare Function sdSoftFindTriggerPointCopy Lib "SDK2250DLL.dll" (ByVal nHTriggerPosition As Integer, ByVal TriggerPoint As Integer, BufferData As Integer) As Integer



'Functions for hardware
Public Declare Function sdSearchDevice Lib "SDK2250DLL.dll" (ByVal DeviceIndex As Integer) As Integer
Public Declare Function sdGetChannelLevel Lib "SDK2250DLL.dll" (ByVal DeviceIndex As Integer, level As Integer, ByVal nLen As Integer) As Integer
Public Declare Function sdSetTriggerAndSampleRate Lib "SDK2250DLL.dll" (ByVal DeviceIndex As Integer, ByVal Trigger_Slope As Integer, Controlstate As ControlData, ByVal TriggerFilt As Integer) As Long
Public Declare Function sdSetVoltageAndCoupling Lib "SDK2250DLL.dll" (ByVal DeviceIndex As Integer, ByVal Ch1_Voltage As Integer, ByVal Ch2_Voltage As Integer, ByVal Ch1_ACDC As Integer, ByVal Ch2_ACDC As Integer, ByVal TriggerSource As Integer) As Long
Public Declare Function sdSetFilt Lib "SDK2250DLL.dll" (ByVal DeviceIndex As Integer, FiltAndTrigger As StateStruct) As Long
Public Declare Function sdSetOffset Lib "SDK2250DLL.dll" (ByVal DeviceIndex As Integer, levers As LeversData, ByVal Ch1Voltage As Integer, ByVal Ch2Voltage As Integer, ByVal TriggerSource As Integer, level As Integer) As Boolean
Public Declare Function sdCaptureStart Lib "SDK2250DLL.dll" (ByVal DeviceIndex As Integer) As Long
Public Declare Function sdTriggerEnabled Lib "SDK2250DLL.dll" (ByVal DeviceIndex As Integer) As Long
Public Declare Function sdGetData Lib "SDK2250DLL.dll" (ByVal DeviceIndex As Integer, ByVal Ch1Voltage As Integer, ByVal Ch2Voltage As Integer, Ch1HardwareData As Integer, Ch2HardwareData As Integer, Controlstate As ControlData, FiltAndTrigger As StateStruct, levers As LeversData, level As Integer, ByVal StartCapture As Integer) As Integer


