473,507 Members | 2,388 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

can i use bioscom to manipulate serial port on winxp

i got a task to manipulate the jet printer. but i wanna only use C to
implement it and without MS's MFC and APIS,

i have wrote some codes in VS2003 with bioscom() but can not debug
it, and can not see anything from super terminal.

can anybody tell me, is it possible?

Jun 28 '07 #1
3 3080
On Jun 27, 6:46 pm, helloguys <zhzhl...@gmail.comwrote:
i got a task to manipulate the jet printer. but i wanna only use C to
implement it and without MS's MFC and APIS,

i have wrote some codes in VS2003 with bioscom() but can not debug
it, and can not see anything from super terminal.

can anybody tell me, is it possible?
You will have a bit of trouble printing without using any API, because
the library call to printf() is an API.
Now, you have not described manipulation of the printer. So we can
only guess what you mean by that.
Quite frankly, I'm a poor guesser.
But my guess is that you want:
news:microsoft.public.vc.language
or something of that sort.

Jun 28 '07 #2

"helloguys" <zh******@gmail.comha scritto nel messaggio news:11**********************@e9g2000prf.googlegro ups.com...
>i got a task to manipulate the jet printer. but i wanna only use C to
implement it and without MS's MFC and APIS,

i have wrote some codes in VS2003 with bioscom() but can not debug
it, and can not see anything from super terminal.

can anybody tell me, is it possible?
FILE *prn = fopen("whatever_your_system_calls_the_printer", "w");
Jun 29 '07 #3
In article <f6**********@tdi.cu.mi.it>, Army1987 <pl********@for.itwrote:
>
"helloguys" <zh******@gmail.comha scritto nel messaggio news:11**********************@e9g2000prf.googlegro ups.com...
>>i got a task to manipulate the jet printer. but i wanna only use C to
implement it and without MS's MFC and APIS,
>i have wrote some codes in VS2003 with bioscom() but can not debug
it, and can not see anything from super terminal.
>can anybody tell me, is it possible?
>FILE *prn = fopen("whatever_your_system_calls_the_printer", "w");
OP strongly implies MS Windows, in which case the serial port
might live off on USB somewhere and potentially needs special
handling to locate or create a device name (I haven't programmed
USB, but the dynamic nature of USB device connections pretty
much requires special handling.)

The OP mentioned "serial port". Serial ports almost always need
to be configured with signalling speed, and often need to
be configured with framing or asynch expectations (e.g.,
start bits, stop bits, bits per character, parity). The
mechanisms to make such configurations are outside of C.

So while there is a -possibility- that a plain fopen() of
some OS-specific name will get you Something Useful, the
chances are not good.
Also, I would suggest that "wb" might be more appropriate than "w"
for manipulating a printer: a number of them allow blocks of
data to be encoded in binary, and you don't want random newline
transformations happening in the middle of that.
--
Prototypes are supertypes of their clones. -- maplesoft
Jun 29 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
8399
by: ST | last post by:
I want my program to show the number and name of the serial ports on my computer in the same style at e.g. Hyperterminal. Like,,,if the computer has 2 serial ports there will only be 2 serial ports...
4
9061
by: ^CeFoS^ | last post by:
Hello to everybody, I've done an application that draws in a frame the trajectory of a robot. The robot position is readed through the serial port, and several commands are wrote through the...
13
4795
by: Al the programmer | last post by:
I need to access the serial ports on my webserver from an asp.net page. I have no problem accessing the serial ports from a windows form application, but the code doesn't work in asp.net. I have...
13
6167
by: Rob | last post by:
Hi all, I am fairly new to python, but not programming and embedded. I am having an issue which I believe is related to the hardware, triggered by the software read I am doing in pySerial. I...
2
4292
by: pauland80 | last post by:
Hello, My soft passively listen to a device sending +- 300 bytes of data each second. After several hours of work, the soft abruptly stops receiving data without any error, (while the device...
1
2450
by: Ani | last post by:
Hi all, I am working on Windows XP and I need to access the Serial port (COM1 & COM2) using C++/C . I donot want to use the functions provided by windows (CreateFile .. etc) which allow me to...
2
2366
by: Ani | last post by:
Hi all, I am working on Windows XP and I need to access the Serial port (COM1& COM2) using C . I donot want to use the functions provided by windows (CreateFile .. etc) which allow me to access...
2
7007
by: Paul Sijben | last post by:
To automate/ease configuration in my app I am trying to find out to which serial port a certain bluetooth device is connected. With pybluez I can find out which bluetooth devices I have, but it...
7
1626
by: John Wright | last post by:
I have data coming into a serial port that I need to take action on. I have created a delegate to read the data from the port and put it into a text box. Once the data is read, I need to...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7111
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7319
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7031
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1542
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
760
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
412
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.