Вот она:
Код:
Код: Выделить всё
;================================================================================
;
; Function Name: _CommGetstring()
; Description: Get whatever characters are available received by the port for the selected channel
; Parameters: none
; Returns: on success the string and @error is 0
; if input buffer empty then empty string returned
; on failure an empty string and @error set to the error set by DllCall
; Notes: Use GetLIne to get a whole line treminated by @CR or a defined character.
;=================================================================================
Func _Commgetstring()
;get a string NB could be part of a line depending on what is in buffer
Local $vDllAns
;$sStr1 = ''
;$vDllAns = DllCall($hDll,'str','GetByte')
$vDllAns = DllCall($hDll, 'str', 'GetString')
If @error 0 Then
SetError(1)
ConsoleWrite('error in _commgetstring' & @CRLF)
Return ''
EndIf
Return $vDllAns[0]
EndFunc ;==>_Commgetstring