Error createfile windows 95

Can someone help me!!

I want to acces the com port under windows 95, I created my application in
delphi 5.
And under windows NT it is working perfect. Here is my source:

hFile := CreateFile(PortName,
GENERIC_READ or GENERIC_WRITE,
0,
Nil,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
0);

and Portname is then \.\COM1 for example.

Under windows 95 I get a error: Acces violation address BFFA3DE1 in
module 'KERNEL32.DLL’Write of address 004EF74

This might help

kind regards

Rob

I think Windows 95 will not understand the file name convention you have
used, so try using “Com1” instead of “\.\com1”.

Let me know if it works or not.

Regards,
S.Sriram
Senior Software Engineer,
Celstream Technologies,
Bangalore,
India.

-----Original Message-----
From: Schalken, Rob [mailto:xxxxx@emdes.nl]
Sent: Wednesday, August 21, 2002 3:37 PM
To: NT Developers Interest List
Subject: [ntdev] Error createfile windows 95

Can someone help me!!

I want to acces the com port under windows 95, I created my application in
delphi 5.
And under windows NT it is working perfect. Here is my source:

hFile := CreateFile(PortName,
GENERIC_READ or GENERIC_WRITE,
0,
Nil,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
0);

and Portname is then \.\COM1 for example.

Under windows 95 I get a error: Acces violation address BFFA3DE1 in
module 'KERNEL32.DLL’Write of address 004EF74

This might help

kind regards

Rob


You are currently subscribed to ntdev as: xxxxx@celstream.com
To unsubscribe send a blank email to %%email.unsub%%

Sorry I should tell before. I already used Com1 as file name, this did not
work!

-----Original Message-----
From: Sriram S [mailto:xxxxx@celstream.com]
Sent: Wednesday, August 21, 2002 13:11
To: NT Developers Interest List
Subject: [ntdev] RE: Error createfile windows 95

I think Windows 95 will not understand the file name convention you have
used, so try using “Com1” instead of “\.\com1”.

Let me know if it works or not.

Regards,
S.Sriram
Senior Software Engineer,
Celstream Technologies,
Bangalore,
India.

-----Original Message-----
From: Schalken, Rob [ mailto:xxxxx@emdes.nl
mailto:xxxxx ]
Sent: Wednesday, August 21, 2002 3:37 PM
To: NT Developers Interest List
Subject: [ntdev] Error createfile windows 95

Can someone help me!!

I want to acces the com port under windows 95, I created my application in
delphi 5.
And under windows NT it is working perfect. Here is my source:

hFile := CreateFile(PortName,
GENERIC_READ or GENERIC_WRITE,
0,
Nil,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
0);

and Portname is then \.\COM1 for example.

Under windows 95 I get a error: Acces violation address BFFA3DE1 in
module 'KERNEL32.DLL’Write of address 004EF74

This might help

kind regards

Rob


You are currently subscribed to ntdev as: xxxxx@celstream.com
To unsubscribe send a blank email to %%email.unsub%%


You are currently subscribed to ntdev as: xxxxx@emdes.nl
To unsubscribe send a blank email to %%email.unsub%%</mailto:xxxxx>

try use FILE_FLAG_OVERLAPPED in place of FILE_ATTRIBUTE_NORMAL.

Best regards,

Heldai
----- Original Message -----
From: “Schalken, Rob”
To: “NT Developers Interest List”
Sent: Wednesday, August 21, 2002 7:07 AM
Subject: [ntdev] Error createfile windows 95

> Can someone help me!!
>
> I want to acces the com port under windows 95, I created my application in
> delphi 5.
> And under windows NT it is working perfect. Here is my source:
>
> hFile := CreateFile(PortName,
> GENERIC_READ or GENERIC_WRITE,
> 0,
> Nil,
> OPEN_EXISTING,
> FILE_ATTRIBUTE_NORMAL,
> 0);
>
> and Portname is then \.\COM1 for example.
>
> Under windows 95 I get a error: Acces violation address BFFA3DE1 in
> module 'KERNEL32.DLL’Write of address 004EF74
>
> This might help
>
> kind regards
>
> Rob
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@scuasecurity.com.br
> To unsubscribe send a blank email to %%email.unsub%%