Click here to Skip to main content
12,945,706 members (48,268 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi, I want to build a small application that can control a bunch of led's connected to the parallel port. From what I've read over the internet, I've come to know that I have to use Inpout32.dll for accessing the port.

> I have downloaded 'Inpout32.dll' and 'inpout.lib', now how do I include it in my visual c++ project. I'm using Visual Studio 11 Ultimate and I'm making a c++ console application.

> What functions do I have to use to send data to the parallel port?

> Can someone point me to a good, lucid, clear tutorial/example other than[^]
Posted 1-Mar-13 17:09pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Please see this CodeProject article: Hardware Interface Programming in VC++ - Part I (Port Access)[^].

Harshil Sharma 2-Mar-13 0:08am
That is a good tutorial, but I want to do it using Inpout32.dll in a console application, no MFC.
What are you talking about?! Ever heard of separation of concerns? MFC is irrelevant here. Don't want it (I understand it very much), don't use it...
Harshil Sharma 2-Mar-13 0:48am
From the whole code, I couldn't separate the port stuff from the MFC stuff.
Well, sorry. I wish I've written the C++ library and demo, but I didn't :-)
However, I would advise you not to rely on something which is ready-to-use, better put some effort.
Good luck,
Harshil Sharma 2-Mar-13 7:27am
Alright, can you tell me how do I include the 'Inpout32.dll' in my project (visual c++ consol application, visual studio 11)?
Never tried that one... in a usual way, I think... :-)
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

I wrote this code:

#include "stdafx.h"
#include "stdio.h"
#include "string.h"
#include "stdlib.h"
#include <conio.h>

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

int main(int argc, char* argv[])

Out32(888, 255);
Out32(888, 0);

return 0;

Is this not supposed to turn on all led's first then turn them off? Nothing happened.

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

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 4,899
CHill60 3,170
Maciej Los 2,443
Jochen Arndt 1,910
ppolymorphe 1,775

Advertise | Privacy | Mobile
Web01 | 2.8.170518.1 | Last Updated 2 Mar 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100