Accessing a port in Windows 2000

H

Thread Starter

Hidayat ullah

I have tried to send a binary value to the parallel port of the computer using the command 'outb()' in VC++ 6.

My operating system windows2000 would not let me access it directly !

What do I do now...
 
D

David Wooden

The short answer is that you can't do that. Not directly, anyway. Windows keeps control of the ports. You need to write a device driver to use the ports directly. A quick, easy workaround can be found at
"http://www.beyondlogic.org":http://www.beyondlogic.org - a program called PortTalk, which you can download freely. The program comes with source code and documentation.

Good luck!

David Wooden
Senior Software Engineer, Systems Integration
Automation and Enterprise Solutions Group
TAS Division of Omron Electronics LLC
Office: (847) 884-7034 Extension 432
Fax: (847) 884-9383
E-mail: [email protected]
 
On Windows NT/200, You couldn't access hardware directly without a driver.
Tried download UserPort :
URL
"http://www.embeddedtronics.com/public/Electronics/minidaq/userport/UserPort.zip":http://www.embeddedtronics.com/public/Electronics/minidaq/userport/UserPort.zip

Its a driver that give user mode programs access to IO port. This driver makes it possible to access hardware directly from a normal executable in same way on windows 95/98/ME

Good Luck::

Suradi
Senior Automation Engineer
PT. Integra Teknik Asia
Office (+62) 21 864 33 55
Fax (+62) 21 869 00 118
Email : [email protected]
 
I am accessing a c++ file from java using JNI concept. In the C++ file ,I am acessing ports and I have a problem when outp function is used when I call using java. Then I changed to WinIo for acessing ports.But since it is a vc++ application I am not able to call it from java using JNI.
Can u give me a solution for it???????????
 
hi,
For windows 98 you can use inp() and outp() functions... but win NT , 2000 or xp will not allow this . you can find a very good solution at my site www.logix4u.cjb.net . and will work on all the 32 bit windows platforms. It consists of an activex control and a dll with some samples. you can use either the activex control or the dll for your project
 
M

moses gichanga

<p>try incorporating this Assembly code into your C++ code, assuming I'm not forgetting anything...
<pre>
#include <windows.h>
void sentData(UINT portid,BYTE value){
asm{
mov adx,portid;
mov al,value
out dx,al
}
}
</pre>
 
if windows forbids me to access my parallel port i will use 98se or boot from floppy.

i have a little thing to this quote, you must be some know-all, if port access is forbidden you can't access the port anyway, get it?
 
C

chandrashekhar

don't worry convert sending into bytes and send it.
but remember one thing, encode data according your reciving device.
Just marshalling concept u can implemented.

if any problem tell me...
but before it u tell me which device u connect to port and what is ur aim to connect it...
 
Top