473,663 Members | 2,877 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 3090
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.langu age
or something of that sort.

Jun 28 '07 #2

"helloguys" <zh******@gmail .comha scritto nel messaggio news:11******** **************@ e9g2000prf.goog legroups.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_ca lls_the_printer ", "w");
Jun 29 '07 #3
In article <f6**********@t di.cu.mi.it>, Army1987 <pl********@for .itwrote:
>
"helloguys" <zh******@gmail .comha scritto nel messaggio news:11******** **************@ e9g2000prf.goog legroups.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_ca lls_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
8405
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 on the list,,,or 10 if the computer has 10. Any suggestions on how this can be done ?
4
9086
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 same port to change the direction of the robot. The trajectory frame is managed by an applet, and the project works good when the applet is called by a html document allocated in the same local machine under W98 where the classes and the serial port...
13
4815
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 been told it is not possible to access the serial ports from asp.net. The application is used to control custom hardware. The hardware is connected to a PC through serial ports. Our customer wants to control the hardware from a remote...
13
6189
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 am sending a short message to a group of embedded boxes daisy chained via the serial port. When I send a 'global' message, all the connected units should reply with their Id and Ack in this format '0 Ack' To be certain that I didn't miss a...
2
4309
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 sends properly, of course) and I need to restart it (the python soft) to "reactivate" the ports. I read that when the serial port encounters an error (frame error or so, I imagine?) it stop receiving data until the library function...
1
2459
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 access the serial port. I am unable to use inportb & outportb as XP does not allow me (PL 3) to access the hardware (PL 0) directly. Can someone help me on this ? Thank you, Anirudh.
2
2373
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 the serial port. I am unable to use inportb & outportb as XP does not allow me (PL 3) to access the hardware (PL 0) directly. Can someone help me on this ? Thank you, Anirudh.
2
7021
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 will not tell me the serial port they are mapped to. Is there a way to figure this out from python? (I am insterested in the platforms WinXP and linux primarily) Paul Sijben
7
1633
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 manipulate it. However, when I try to take any action on the data, I get errors. When I call the function GetTareandWeight, it gives me an error on the split function because the data is not done streaming in yet. How can I wait for all the data to get...
0
8436
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8345
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8858
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8548
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8634
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7371
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4182
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2000
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.