fb:porticula NoPaste
CTS abfragen
Uploader: | Sebastian |
Datum/Zeit: | 03.06.2008 20:32:03 |
'CTS-Abfrage-Funktionsprovisorium
#Include Once "windows.bi"
FUNCTION GetCTSState () As INTEGER
Dim hCom As handle, modemStat As Dword, result As Integer
hCom = CreateFile("COM1", GENERIC_READ Or GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL)
If hCom = INVALID_HANDLE_VALUE Then RETURN -1
GetCommModemStatus(hCom, @modemStat)
IF (modemStat And MS_CTS_ON) Then
result = 1
ELSE
result = 0
END IF
CloseHandle(hCom)
Return Result
END FUNCTION