Author Topic: Inpout32.dll or Windows 7 ?  (Read 51608 times)

Waqar

  • Member
  • ***
  • Posts: 2
Inpout32.dll or Windows 7 ?
« 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

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Inpout32.dll or Windows 7 ?
« Reply #1 on: August 19, 2011, 09:36:21 pm »
Use the WinXP version.

Jan

Waqar

  • Member
  • ***
  • Posts: 2
Re: Inpout32.dll or Windows 7 ?
« Reply #2 on: August 22, 2011, 03:24:02 pm »
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.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Inpout32.dll or Windows 7 ?
« Reply #3 on: August 22, 2011, 04:41:51 pm »
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
« Last Edit: June 29, 2015, 10:22:32 am by Jan Axelson »

yuwi29

  • Member
  • ***
  • Posts: 1
Re: Inpout32.dll or Windows 7 ?
« Reply #4 on: January 18, 2012, 08:09:13 pm »
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!

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Inpout32.dll or Windows 7 ?
« Reply #5 on: January 18, 2012, 09:49:58 pm »
Be sure you're writing to the correct address. (Look in Device Manager.)

Try writing to the data port first.

Jan

viv

  • Member
  • ***
  • Posts: 2
Re: Inpout32.dll or Windows 7 ?
« Reply #6 on: May 09, 2012, 06:24:52 pm »
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();

        }

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Inpout32.dll or Windows 7 ?
« Reply #7 on: May 09, 2012, 11:00:08 pm »

viv

  • Member
  • ***
  • Posts: 2
Re: Inpout32.dll or Windows 7 ?
« Reply #8 on: May 10, 2012, 06:14:43 pm »
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.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Inpout32.dll or Windows 7 ?
« Reply #9 on: May 10, 2012, 06:50:56 pm »
Glad you got it working. Thanks for reporting what you found.

Jan