'Open' on WinNT and Win95 
Author Message
 'Open' on WinNT and Win95

Can anyone tell me why the command

Open(Target_File,Append_Mode,"COM1");

runs successfully on WinNT platform but raises a Device_Error when run on a
Win95 platform ?



Fri, 22 Nov 2002 03:00:00 GMT  
 'Open' on WinNT and Win95


Quote:
> Open(Target_File,Append_Mode,"COM1");

> runs successfully on WinNT platform but raises a Device_Error when run
> on a Win95 platform ?

Does that Win95 platform actually have a working "COM1"? Try hooking
some other device to it and addressing that device with that name. My
Win98 machine at home often doesn't have the COM ports setup working
properly unless I tweak things. This is particularly an issue if you are
using a lot of IRQs (eg: using a PS/2 mouse),

--
T.E.D.

http://www.telepath.com/~dennison/Ted/TED.html

Sent via Deja.com http://www.deja.com/
Before you buy.



Fri, 22 Nov 2002 03:00:00 GMT  
 'Open' on WinNT and Win95

Quote:

> Can anyone tell me why the command

> Open(Target_File,Append_Mode,"COM1");

> runs successfully on WinNT platform but raises a Device_Error when run on a
> Win95 platform ?

That would probably be because WinNT is a "real" operating system and
Win95 is a "toy" operating system - or the first computer virus to come
complete with a GUI interface. :-)

If you're trying to write to the COM1 port, you might try checking to
see if possibly something else has control of it while you're trying to
open it. Check out Win32api documentation on the CreateFile call for
insight as to how the system really connects to something like the COM
port. (I've got "Win32 System Services" by Marshall Brain and frequently
find it invaluable.) You might also check out the compiler documentation
to see if they say anything about using the "Form" parameter to the Open
command. You may be able to specify additional access control
information.

Or you might check to see if the device connected to COM1 is broke?

MDC
--
======================================================================
Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/

Visit my web site at:  http://www.mcondic.com/

"Some people think programming Windows is like nailing jello to the
ceiling... easy with the right kind of nails."

    --  Ivor Horton - Beginning Visual C++ 6
======================================================================



Sat, 23 Nov 2002 03:00:00 GMT  
 'Open' on WinNT and Win95
You may also want to try something like:

copy con: com1:

or

copy test.txt com1:

and see if it creates an error.

David Botton



Quote:

> > Can anyone tell me why the command

> > Open(Target_File,Append_Mode,"COM1");

> > runs successfully on WinNT platform but raises a Device_Error when run
on a
> > Win95 platform ?

> That would probably be because WinNT is a "real" operating system and
> Win95 is a "toy" operating system - or the first computer virus to come
> complete with a GUI interface. :-)

> If you're trying to write to the COM1 port, you might try checking to
> see if possibly something else has control of it while you're trying to
> open it. Check out Win32api documentation on the CreateFile call for
> insight as to how the system really connects to something like the COM
> port. (I've got "Win32 System Services" by Marshall Brain and frequently
> find it invaluable.) You might also check out the compiler documentation
> to see if they say anything about using the "Form" parameter to the Open
> command. You may be able to specify additional access control
> information.

> Or you might check to see if the device connected to COM1 is broke?

> MDC
> --
> ======================================================================
> Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/

> Visit my web site at:  http://www.mcondic.com/

> "Some people think programming Windows is like nailing jello to the
> ceiling... easy with the right kind of nails."

>     --  Ivor Horton - Beginning Visual C++ 6
> ======================================================================



Sat, 23 Nov 2002 03:00:00 GMT  
 'Open' on WinNT and Win95
The command

        Open(Target_File,Out_Mode,"COM1");

works okay so I assume that the port is accessible.

Quote:



>> Open(Target_File,Append_Mode,"COM1");

>> runs successfully on WinNT platform but raises a Device_Error when run
>> on a Win95 platform ?

>Does that Win95 platform actually have a working "COM1"? Try hooking
>some other device to it and addressing that device with that name. My
>Win98 machine at home often doesn't have the COM ports setup working
>properly unless I tweak things. This is particularly an issue if you are
>using a lot of IRQs (eg: using a PS/2 mouse),

>--
>T.E.D.

>http://www.telepath.com/~dennison/Ted/TED.html

>Sent via Deja.com http://www.deja.com/
>Before you buy.



Sat, 23 Nov 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. opening 'file open' dialog from console

2. Problem with open pipe on Win95 that works on WinNT and Unix

3. help garden point's m2 won't install under winNT

4. 'wm resizable' under WinNT

5. 'CHAIN' command under WIN95

6. Newbie:'Entry' echo problem Unix/Win95

7. Defining Win95 'File Type'

8. Cincom Open Sources 'Frost'

9. Intellimouse Returns 'File Not Open'

10. Can't open xxxx.DBF error in Summer '87

11. 'Open' languages: e.g., MATLAB

12. open 'no-exist' rescue true - idiom

 

 
Powered by phpBB® Forum Software