![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Sep 2005
Posts: 50
Rep Power: 0
![]() |
communicating with printer port
hi, i am trying to use my printer port to send and recive the data. it was all working fine untill i had to do it on windows xp. now my basic fuctions do't work like inportb,outportb etc . so i ahve no way to do so . now can any one help me out.
electronics student so do't have much of hand in c API. tahnks |
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
More modern OSes work in protected mode and shield most I/O from the machinations of the average programmer (for good reason -- you might kill another running app). MSDN is the place to start for things like this.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#3 |
|
Programmer
Join Date: Sep 2005
Posts: 50
Rep Power: 0
![]() |
but could u give some hints so that i can get a head start.
thanks |
|
|
|
|
|
#4 |
|
Programmer
Join Date: Sep 2005
Posts: 58
Rep Power: 4
![]() |
|
|
|
|
|
|
#5 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
I don't know what you mean by "hints", exactly. Consider if you executed your program that communicated directly with the printer. What would happen if the printer were currently spitting out a file spooled by, say, Word? Not gonna do that, you say? Who's to know? Consequently, you are buffered from sensitive areas by controlling mechanisms of the OS. Drivers (which now do the bulk of that sort of work) run with different levels of permission than the average application. MS has a DDK (driver development kit). MSDN has lots of information on using such things. If you're looking for someone to pop you a short function that will solve the problem, you're no doubt out of luck. The sort of thing you're looking for is called Windows I/O Ctl.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#6 |
|
Programmer
Join Date: Sep 2005
Posts: 50
Rep Power: 0
![]() |
hint meant, a function that could do the intraction with ports & can write and read frm it. i have made a ckt (wireless) which could transmitted and recieve the data to other computer. it takes data frm printer port and feeds to it. it is duplex in nature .code runs fine in 9x. but i have to present it on xp, so the problem lies here. i do't have any idea how to do it in xp coz xp does not allow direct hardware interaction. so i am stuck.
|
|
|
|
|
|
#7 |
|
Programmer
Join Date: Jun 2005
Posts: 86
Rep Power: 4
![]() |
You could use something like this:
http://www.beyondlogic.org/porttalk/porttalk.htm |
|
|
|
|
|
#8 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,221
Rep Power: 5
![]() |
There is also a lot of information available through this link.
|
|
|
|
|
|
#9 |
|
Programmer
Join Date: Sep 2005
Posts: 50
Rep Power: 0
![]() |
can i do this without the dlls grumpy
|
|
|
|
|
|
#10 |
|
Programmer
Join Date: Sep 2005
Posts: 50
Rep Power: 0
![]() |
thaTS INPOUT32.DLL IS NOT WORKING CAN I HAVE A DIRECT APPROACH.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|