mustang82
Junior Member level 3
- Joined
- Dec 2, 2005
- Messages
- 27
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Location
- Third Rock from the sun
- Activity points
- 1,556
hr_rezaee said:hi
see www.logix4u.net
that contains many usful information about parallel port and XP and solutions.
sss123 said:Any body knows a parallel port sniffer software that could work on XP?
since windows 2000 and XP have a restriction in accessing hardware resources via it's addresses you can avoid this restriction by accessing the ports via it's driver using the following API Functions
1- to Open the parallel port use the following function
hDevice = CreateFileW(
"LPT1",
GENERIC_READ|GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
0,
NULL);
2- to write to the parallel port use the following function
DeviceIoControl(
hDevice,
IOCTL_PP_WRITE_DATA,
&Value,
sizeof(Value),
&FakeByteForDriverBug,
sizeof(FakeByteForDriverBug),
&Transferred,
NULL);
3- to access the control pins use
DeviceIoControl(
hDevice,
IOCTL_PP_WRITE_CONTROL,
&Value,
sizeof(Value),
&FakeByteForDriverBug,
sizeof(FakeByteForDriverBug),
&Transferred,
NULL);
4- to read the status pins use
DeviceIoControl(
hDevice,
IOCTL_PP_READ_STATUS,
NULL,
0,
pValue,
sizeof(UCHAR),
&Transferred,
NULL);
5- and finally to close the paralllel port (you must close it after you finish your work to make it avilable for other programs) use
CloseHandle(hDevice);
these function can be used from any programming language (they are built in the operating system itself) and work in win 98 to win XP
please refer to your compiler documentation for more information
note also that there is no book describe these functions, only the compiler documentation does so.
for furthur information see the attached C file
Good Luck
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?