Hi all,
I have read the help and repeatedly try to translate it but I can not get from Delphi to convert to PB.
Can anyone help me sometimes to write in PB this?
It's still just the bits that I need for my sll library serial port for a client and then test it and sell the library.
Thanks in advance
Stephane
I have read the help and repeatedly try to translate it but I can not get from Delphi to convert to PB.
Code:
WriteFile(PortHandle,(Pchar(Buffer))^,Length(Buffer),BytesWritten,NIL); I Try this in PB: g_PortHandle = CreateFile(VarPtr(strPort),%GENERIC_READ Or %GENERIC_WRITE, ByVal 0, ByVal 0, %OPEN_EXISTING,0,0)
Code:
function OpenSerial (OpenString: pchar): Integer; I try this in PB: Function OpenSerialPort(ByRef szOpenStr As StringZ) As Integer
Code:
PortHandle:=CreateFile(PChar(PortStr),GENERIC_READ or GENERIC_WRITE,0,NIL,OPEN_EXISTING,0,0); I try this in PB: g_PortHandle = CreateFile(varptr(strPort),%GENERIC_READ OR %GENERIC_WRITE, byval 0, byval 0, %OPEN_EXISTING,0,0)
Code:
if ClearCommError (PortHandle, Errors, @Comstat) then I try this: if ClearCommError(g_PortHandle, Errors, @Comstat) then
It's still just the bits that I need for my sll library serial port for a client and then test it and sell the library.
Thanks in advance
Stephane
Comment