Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing to the printerport

Status
Not open for further replies.

logge

Programmer
Jun 16, 2000
6
NL
Hi!

Does anyone know how to write data to the printerport in windows 2000? It does not seem to allow direct access, so there has to be another way?

Thanks,

Peter Logarn
 
What kind of data do you want to send to the printer?
If you are writing a classic Winapp you can use the standard windows way to write to the printer, but i figure that you already knew that...

If you want direct access to the printer port, you might have to use the windows DDK... Are you writing a driver for a printer?
What functions did u use?
If using OpenPrinter, be sure to specify the DesiredAccess member of the PRINTER_DEFAULTS structure to the things you need (eg PRINTER_ACCESS_ADMINISTER...)

[red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro
 
Hi!

I'm not writing a printer driver. I have a small microproccessor controlling a mixer, that I want to be able to send commands to.

The communication with the processor is very simple.
All I would need to do is to write binary values to the printerport. Right now the mixer is controlled from a DOS program, but for obvious reasons I would like to use a windows program instead.

I tried to use the function _outp to do this, but in win 2000 this gives me an access violation.

/Peter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top