Attribute VB_Name = "Modul1"
Option Explicit



Rem Windows functionen
Declare Function ShellAbout Lib "shell32.dll" Alias "ShellAboutA" (ByVal hwnd As Long, ByVal szApp As String, ByVal szOtherStuff As String, ByVal hIcon As Long) As Long
Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As Long
Declare Function CreateIC Lib "gdi32" Alias "CreateICA" (ByVal lpDriverName As String, ByVal lpDeviceName As String, ByVal lpOutput As String, lpInitData As Long) As Long
Declare Function DeleteDC Lib "gdi32" (ByVal hdc As Long) As Long



Rem Konstanten
Public Const MaxByte = 64001
Public Const MaxChannel = 7
Public Const TimeOut = 1000000
Public Const BIF_RETURNONLYFSDIRS = &H1


Rem Variablen
Rem Public Data(0 To 3) As Byte: Rem Adress , Teiler und StatusBytes
Rem Dim status_merker As Integer

Rem I2C InterFace
Public LPTPort(0 To 3) As Byte
Public LPT As Integer
Public ii2c_check

Public DrawArea As Rectangle
Public ChYVal(0 To 8) As Single                 ' Rem Y Werte für Kanäle
Public MessArray(0 To 7, 0 To MaxByte) As Byte  ' Dieses Array nimmt sämtliche Messwerte auf
Public MessTempA(0 To MaxByte) As Byte
Public mCount                                   ' Anzahl der Messungen , Startwert 1000
Public StartShow                                ' StartAnzeige
Public EndShow                                  ' Ende ANzeige


Public Function atGetdevcaps%(ByVal intCapability%)
'===========================================================
' Purpose:     Returns information on the capabilities of
'              a given device. Which device is determined
'              by the arguments to api_CreateIC. Which
'              capability is determined by the intCapability
'              argument which is one of the constants
'              defined for the GetDeviceCaps Windows API
'              function.
' Arguments:   intCapability - index of capability to check
'              see win32api.txt for list of values
' Returns:     Results of call to GetDeviceCaps
'-----------------------------------------------------------
 
    Dim hdc&  'handle for the device context
 
    'Specify the device -- use "DISPLAY' to check screen capabilities
    Const DRIVER_NAME = "DISPLAY"
    Const DEVICE_NAME = 0&
    Const OUTPUT_DEVICE = 0&
    Const LPDEVMODE = 0&
 
    'Get a handle to a device context (hDC)
    hdc = CreateIC(DRIVER_NAME, DEVICE_NAME, OUTPUT_DEVICE, LPDEVMODE)
    If hdc Then
 
        'If a valid hDC was returned, call GetDeviceCaps and
        'then release the DC
        atGetdevcaps = GetDeviceCaps(hdc, intCapability)
        hdc = DeleteDC(hdc)
    End If
 
End Function
 
 

Public Function PETrigger() As Boolean
' Ergibt True, wenn Eingang auf LOW gezogen wird
Dim temp As Integer
 temp = get_status(0)
 PETrigger = temp And 32
End Function

