PORTS Forum
Ports and Interfaces => Parallel Port => Topic started by: Waqar on August 19, 2011, 07:25:05 pm
-
Hello,
I was wondering is there inpout32.dll version for windows 7? Logix4u.net lists it for 95/98/ME/XP and a version for the 64-bit Windows 7 but what about a normal 32-bit windows 7 which dll am i supposed to use for that ? i am using Windows 7 and VB 2010
-
Use the WinXP version.
Jan
-
Thanks for your reply.
OK i have read your mainpage and logix4u but honestly i still don't get how to use the dll file. I try to add the dll as a reference but it gives me an error, so basically my question is what exactly do i need to download/install, place it where and what to do in VS2010 so i can use the commands in C# to turn parallel port pins on and off.
-
See my Test_inpout32_vbdotnet.zip example application here:
http://www.janaxelson.com/parport.htm#Programming
See the readme file. You'll need to convert the syntax from Visual Basic.
This might help:
http://www.developerfusion.com/tools/convert/vb-to-csharp/
I need to do a C# version!
Jan
-
hi waqar, i wonder if you could help me access parallel port in windows 7. I already have inpout32.dll in my c:\windows\system32 folder. when running my application (windows Form appli n c#), there is no error but there is NO RESPONSE from the parallel port. I already run this application in windows XP and i don't get any problem. please reply. thank you!
-
Be sure you're writing to the correct address. (Look in Device Manager.)
Try writing to the data port first.
Jan
-
Hi Jan,
I am facing the same problem. inpout32.dll works great on win xp. but when i try to use it on windows7 32 bit machine, it gives no error. Ideally it should open port for communication and the shutter attached to it should flicker. That flickering of shutter does not happen.
i tried writing data to the parallel port ECP Printer Port(LPT1 ) at 0x378.
when i try reading back the data it gives back 120 value for any input.
for example if i write 24 on the parallel port, it returns back 120
even if i write 10, it returns 120.
Please guide me, as to how to solve it.
Following is my sample code:-
class Program
{
/// <summary>
/// This method will be used to send the data out to the parallel port.
/// </summary>
/// <param name="adress">Address of the port to which the data needs to be sent.</param>
/// <param name="value">Data that need to send out.</param>
[DllImport("inpout32.dll", EntryPoint = "Out32")]
public static extern void Output(int address, int value);
/// <summary>
/// This method will be used to receive any data from the parallel port.
/// </summary>
/// <param name="address">Address of the port from which the data should be received.</param>
/// <returns>Returns Integer read from the given port.</returns>
[DllImport("inpout32.dll", EntryPoint = "Inp32")]
public static extern int Input(int address);
static void Main(string[] args)
{
int address = 0x378;
int value = 24;
Program.Output(address, value);
//int address = 888;
Program.Output(address, 10);
int value1;
value1 = Program.Input(address);
Console.WriteLine("value1=" + value1);
Console.ReadLine();
}
-
Maybe this will help:
http://www.vbforums.com/showthread.php?t=643913
Jan
-
hey hi,
Thanks for your reply, i finally found i was using the older version of the dll, the one from logix4u website. The url that you pointed me to had the link to the updated inpout32.dll.
So this is what i did:-
URL for the correct dll:- http://www.highrez.co.uk/downloads/inpout32/default.htm
i downloaded 32 bit dll from Binaries only - x86 & x64 DLLs and libs. (Mirror)
For end users of applications designed for use with InpOut32 (for example LCDSmartie) this is all you need.
It also contains everything required to develop your own application. See the readme file for further information.
-
Glad you got it working. Thanks for reporting what you found.
Jan