Re: Delphi problem with Laptop
- From: Jamie <jamie_ka1lpa_not_valid_after_ka1lpa_@xxxxxxxxxxx>
- Date: Sat, 23 Dec 2006 17:09:02 -0500
Gert Baars wrote:
The following:file name should be like
// create handle to serial port
procedure TCustomComPort.CreateHandle;
begin
FHandle := CreateFile(
PChar('\\.\' + FPort),
GENERIC_READ or GENERIC_WRITE,
0,
nil,
OPEN_EXISTING,
FILE_FLAG_OVERLAPPED,
0);
if FHandle = INVALID_HANDLE_VALUE then
raise EComPort.Create(CError_OpenFailed, GetLastError);
end;
is from CPORTLIB3.0 VCL that raises
the exeption (open error) only on Laptop
and not on the PC (either with or without
File I/O error checking on).
How could this be solved?
COM1: COM2: COM2: etc..
the use of \\.\ is for non mapped devices if i remember?
--
"I'm never wrong, once i thought i was, but was mistaken"
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5
.
- Follow-Ups:
- Re: Delphi problem with Laptop
- From: Old Fan
- Re: Delphi problem with Laptop
- References:
- Delphi problem with Laptop
- From: Gert Baars
- Delphi problem with Laptop
- Prev by Date: Re: Delphi problem with Laptop
- Next by Date: Re: If statements more robust than asserts.
- Previous by thread: Re: Delphi problem with Laptop
- Next by thread: Re: Delphi problem with Laptop
- Index(es):
Relevant Pages
|