![]() | ![]() | ![]() |
| | |||||||
| General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion? |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| hi, just got a problem that's buggin' me for a while now. I'm trying to access the parallel port and downloaded the inpout32.dll and tried to access the ports after I placed the inpout32.dll in C:\windows\system, but there is still a problem and an error occurs, the exact link of the code i'm trying to do is this http://www.logix4u.net/parallelport1.htm | |
| |
| | (permalink) | |
| Quote:
BTW, did you install the program?, the one I use requires installing. | ||
| |
| | (permalink) | |
| Quote:
__________________ Time is nature\'s way of keeping everything from happening at once. http://membres.lycos.fr/jrainville/ | ||
| |
| | (permalink) | |
| Quote:
__________________ InfinityCreation - Where creations goes to infinity! | ||
| |
| | (permalink) |
| the instructions only told me to put the inpout32.dll in the C:\windows\system folder, it doesn't need to be installed (i think), it is located here [url]http://www.logix4u.net I already put the inpout32.dll in C:\ (the same directory as the exe file, and C:\windows\system, and C:\windows\system32, but doesn't work, A window appeared an asked me to send an error report to microsoft, I attached the details of the error | |
| |
| | (permalink) |
| I'm trying to do camera that follows a moving object (it must be pc based), so i'll need to experiment on the parallel port, after the program sees where the object is going, the motor beneath the camera must rotate in order for the camera to catch up. Nigel, can the driver you mentioned be used in this project? | |
| |
| | (permalink) | |
| Quote:
__________________ InfinityCreation - Where creations goes to infinity! | ||
| |
| | (permalink) |
| i've already tried it with visual basic and it went fine, got it running in VB6 a few months ago. but my project needs to be done in visual C++ right now because the image processing will be done in C++, and I would like to have a uniform language in my project so as not to have problems with the delay in processing instructions, etc...I chose C++ for the speed of image processing. The problem is, I have no experience in using inpout32.dll for visual C++. | |
| |
| | (permalink) | |
| Quote:
Code: // InpoutTest.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "stdio.h"
#include "string.h"
#include "stdlib.h"
/* ----Prototypes of Inp and Outp--- */
short _stdcall Inp32(short PortAddress);
void _stdcall Out32(short PortAddress, short data);
/*--------------------------------*/
int main(int argc, char* argv[])
{
int data;
if(argc<3)
{
//too few command line arguments, show usage
printf("Error : too few arguments\n\n***** Usage *****\n\nInpoutTest read <ADDRESS> \nor \nInpoutTest write <ADDRESS> <DATA>\n\n\n\n\n");
}
else if(!strcmp(argv[1],"read"))
{
data = Inp32(atoi(argv[2]));
printf("Data read from address %s is %d \n\n\n\n",argv[2],data);
}
else if(!strcmp(argv[1],"write"))
{
if(argc<4)
{
printf("Error in arguments supplied");
printf("\n***** Usage *****\n\nInpoutTest read <ADDRESS> \nor \nInpoutTest write <ADDRESS> <DATA>\n\n\n\n\n");
}
else
{
Out32(atoi(argv[2]),atoi(argv[3]));
printf("data written to %s\n\n\n",argv[2]);
}
}
return 0;
}
__________________ InfinityCreation - Where creations goes to infinity! | ||
| |
| | (permalink) |
| you need to inport the dll to the project! and the lib file.
__________________ when you post that reply, im just kidding. | |
| |
| | (permalink) |
| what operating system are you using? I'm using windows XP and I had a problem talking to my parallel port because there was something in the O.S. that blocked me from accessing it. I dunno if this is your problem or not, but I thought I'd throw it out there. ....edit: Nevermind, just scrolled through your link there and saw that the problem was fixed inside that DLL file.
__________________ Jeff To the optimist, the glass is half full. To the pessimist, the glass is half empty. To the engineer, the glass is twice as big as it needs to be. | |
| |
| | (permalink) |
| I still don't understand, may someone please tell me what a dll does and what inpout32.dll does?I really have no clue yet | |
| |
| | (permalink) |
| a DLL is the windows equivelent of a .so file for Linux basically a shared libary of functions say you write a program and in that program you want to have a dialog box for choosing a file you can do two things 1) write one from scratch yourself 2) use the one provided by your operating system/Desktop manager number 2 is perfered since it simplifies your code by re-using someone elses code/function So you want to write a program that accesses the parallel port (linux this would be very easy btw). So you can do two things 1) write a low-level access to the BIOS to access and enumerate the parallel port 2) take advantage of someone elses hardwork and use their functions now this inpout32.dll will do this, it provides the nessacary fucntions to use the parallel port easily. To use it you need a header file (probably call inpout32.h) and do a #include at the start of your code This will give your code access to the functions contained within the DLL. Shared libaries aid in keeping things simple, why bother re-inventing/re-coding something that someone else has done I am a python programmer and the equiv is the import declaration to load in the ability to use functions that other ppl have written | |
| |
| | (permalink) | |
| Quote:
If you want to see more about it, have a look at http://www.logix4u.net/inpout_theory.htm for details, including a link to the source code. | ||
| |
| | (permalink) | ||
| Quote:
Been a while since coding for windows and low-level (windows 3.1) So sounds like you need to have kernel-access to code one yourself (very hard from what I have heard with the NT kernel) so use the code someone else has done | |||
| |