Click here to Skip to main content
15,887,328 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi i create a program a couple years ago in order to control step motor via parallel port by using VC++2005 and XP, it worked fine
but now i am writing the same codes and linking the same library (inpout32.lib) in VC++ 2008 and windows 7, it also works and no error acoours, but i cannot control parallel port, i cant figure out what the problem isç pls help!. here is my code;

#include "stdafx.h"

#define PORT 0x378



short _stdcall Inp32(short PortAddress);
void _stdcall Out32(short PortAddress, short data);


int main(array<System::String ^> ^args)
{
	Out32(PORT,255);
	
}
Posted

hi...
There is no problem with the code..

To test the parallel port, use LEDS first... connect 8 LED's to the 8 ouput pins of parallel port...

for the code 'Out32(PORT,255);' , all 8 LEDs should glow, else give the data as 1,2,4,8,16,32,64,128 each time to see whether each LED glows individually..

If the LEDs dont respond, then i am sure, u need to flush the parallel port, before controlling it...
 
Share this answer
 
U can use win95io.dll to control parallel port from visual basic....
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900