473,788 Members | 3,027 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Writing raw data to a USB printer

AM
What I am trying to do is write raw data to a USB to parallel adapter
to control an external device (as I dont have a parallel port) using
VC++.net or C#
The adapter is not a true parallel port and is hence treated as a USB
device. How would I be able to write raw data or ASCII data to this
adapter? Can I use the WritePort
(http://msdn.microsoft.com/library/de...eb4174.xml.asp)
function and if so how ? an example would help a lot.

Thanks,
AM

Dec 10 '06 #1
1 7276
What I am trying to do is write raw data to a USB to parallel adapter
to control an external device (as I dont have a parallel port) using
VC++.net or C#
The adapter is not a true parallel port and is hence treated as a USB
device. How would I be able to write raw data or ASCII data to this
adapter? Can I use the WritePort
(http://msdn.microsoft.com/library/de...eb4174.xml.asp)
function and if so how ? an example would help a lot.
Hi,

Those adapters are not meant to be parallel port compatible. You can do all
sorts of things with a true parallel port, but those USB devices are only
meant to support the printer protocol. You cannot use them to toggle lines to
control external devices.

As for writing raw data to a USB device, read my blog post on this:
http://msmvps.com/blogs/vandooren/ar...2B003F00_.aspx

--
Kind regards,
Bruno.
br************* *********@hotma il.com
Remove only "_nos_pam"

Dec 12 '06 #2

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

Similar topics

4
24229
by: Mathew | last post by:
I am looking to write a program with Microsoft Visual Basic 6 that writes out to the com port. After the inital Connection. I will be connecting at 9600, 8 data bits, with hardware flow control. Once connected I will be sending regular ascii commands to the connected device (in this case Cisco 3550 series switches.) Has anyone done this or can they point me to a procedure or built in command set that can do this? Thx in advance. ...
0
1415
by: pilar | last post by:
Hi All, It is possible to restrict data entry for 2 fields at the same time?, i know how this may sound for you, please don't insult me (just kidding, this is a great newsgroup). In my first Access database I just found a big design mistake. There is a table - tblsystem- with 2 fields -upperprinter and lowerprinter- this 2 fields contains the same type of data, they store the printers serial numbers. Now I found duplicate entries for the...
6
2564
by: notregister | last post by:
hi, i have been trying to send a printer-ready data to an unknown printer to print. the reason why the printer is unknown is that i do no wish installed any printer driver. so at the end my printing would have to bypass the printer driver.. i have read several article on sending file directly to a printer, but i could not understand how could i get the printername from the ports(especially when there is no driver install)? Can anyone...
1
1638
by: pigge79 | last post by:
Hi there, We are thinking of developing a product that needs to be able to parse data printed via some printer driver. The data will then be used to fill a PDF form. We believe the printer solution will be best as there are multiple applications that we need to retrieve data from. This is a brand new area for us, so I'm basically wondering if there is any out-of-the-box printer drivers that create files with a structure that we can...
4
4232
by: Schwarty | last post by:
I hope I posted this to the correct group. If not, please let me know and I will get it posted in the correct section. I have a web application developed in ASP.NET using C# for the code behind. I need to be able to print shipping labels from a web page within this application. The shipping label data is pulled from a 3rd party application and comes in binary format specific for certain brands of label printers. I have a class library...
13
21699
by: Susan Beebe | last post by:
I have downloaded the code described in Microsoft article Q154078. I am trying to send raw ZPL (zebra barcode printer) code from Microsoft access. It works just fine if I hard code the actual data in the string being sent to the printer. However, if I prompt the user for data or if I insert data from a particular record/field in a form Access crashes/closes on its own. I have included the code below, if anyone has any suggestions,...
2
11779
alpnz
by: alpnz | last post by:
Hi, I am involved with a labelling application, which at the moment prints labels on thermal printers, via the windows driver. This can be frustratingly slow. Most thermal printers have an ASCII command set which enables the simple copying of files directly to the printer port. The result is instant printing of labels. A much more satisfactory result in a busy environment. The command set allows the setting of variables on template files, and...
2
4413
by: MAx | last post by:
Hi guys, I am a c++ newbee and i am trying to write a file to a default printer. Please have a look at the code below and let me know if it'll work. I know that similar code in C will work. I was wondering how will the associated driver react..... #include <iostream> #include <fstream>
7
8217
by: RB0135 | last post by:
Hi All, I have some Windows BMP, 1BPP, monochrome files that I need to get the raw data from to load a graphics buffer on a Roll Printer (which I know can be done). Lets forget about the Roll Printer in this equation as I am not sure I am getting the correct "raw" image from the file. However, when I print what I think is the raw data, I get the image size, but the information within the image looks nothing like it should be, and...
0
9655
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
9498
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
10363
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...
0
9964
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
8993
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
7517
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
5398
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
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.