inpoutx64 not working on win 10

My x64 port of InpOut32
Post Reply
babaq
New User
Posts: 2
Joined: Tue Mar 26, 2019 1:07 am

inpoutx64 not working on win 10

Post by babaq »

Hi,

we have used the inpoutx32 and inpoutx64 successfully in our Unity program on win 7 for years, recently we tried to use it on win 10, and it complains that inpoutx64.dll is invalid.

In order to separate the problems, we tried to debug the .NET example project download from the site and it works properly.

but Unity still complains with Dll dot found error.

I have no idea what to do, please help.

Alex
Last edited by babaq on Tue Mar 26, 2019 2:34 am, edited 1 time in total.
User avatar
phil
Site Admin
Posts: 7611
Joined: Sun Apr 06, 2003 11:12 pm

Re: inpoutx64 not working on win 10

Post by phil »

I have to confess, I don't think Ive tried Inpout on Windows 10 (certainly not a recent windows 10). I haven't personally used InpOut in any form for over 10 years.

What version of Windows 10 are you trying it on?

Only thing I can think of.. Is your Vs2017 program running in 32bit or 64bit mode 9as MS seem to have changed the defaults back to 32bit and your calling the x64 function).

On my laptop I have v1809 - the driver appears to install fine and I can confirm that the .NET test project on the download website (built using VS2015) reports that the DLL and driver is opened successfully but I don't know if its actually working (my laptop does not have a parallel port OR a PC beeper/speaker so the beeper test in the .NET test program makes no noise - but it does not give any errors, suggesting the communicated OK).

If I get a chance, I'll try it on my desktop tomorrow (I thin that still has a beeper but I better check first!).

I have heard that MS will be requiring drivers to be signed with a SHA256 certificate soon (I don't think this is enforced yet) but when it is, you will be out of luck because I have no way of signing device drivers any more (the current one was signed many years ago and has continued to work until now AFAIK). Unless someone is able to purchase a driver signing cert and re-sign the driver for me (I cant buy a driver signing cert as a hobbyist as you need to have a registered company, and lots of money!), thats the project completely dead.

Regards,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
babaq
New User
Posts: 2
Joined: Tue Mar 26, 2019 1:07 am

Re: inpoutx64 not working on win 10

Post by babaq »

Hi Phil,

Thanks your prompt replay, i think I just solve the problem.

you are right that vs 2017 is default to use x32 bit .NET framework, after switch to x64, the example code works fine. but Unity still report DLL not found exception.

So after some searching, I tried to remove .dll extension name from the dll name in DllImport, and it worked, very wired problems. Anyway, i can confirm the inpoutx64.dll works in win10 both on .NET framework and Unity 2018.3

I didn't aware of the driver signing problem, if MS is really going to change the driver signing mechanism, I think the community might be able to resign it, since the inpout project is really helpful and a lot of production system relying on it. In our case, we are using it as a fast IO line, because the parallel port is currently the fastest and cheapest solutions, and most USB2 IO board have ~10ms latency which is not tolerable.

Alex
Noldos
New User
Posts: 2
Joined: Wed Apr 03, 2019 4:52 pm

Re: inpoutx64 not working on win 10

Post by Noldos »

Hi, sorry to attach my issue to another post, but since it is more or less the same issue and i hope to reach the right people that way. I'm trying to use inpout64 on windows 10 to be able to use it in our new unity experiment. We've used it for years under windows 7 through prof. Schieber's adaptation for Matlab and I tried to use it the same way in order to set it up in windows. This didn't work.
I compiled the C++ example and i got the same result.

Both methods seem to work fine, besides the fact that nothing happens on the port. I don't get any errors or warnings or anything. I remembered that last time I had a hard time with UAC, but this time I did put it on minimum level and even completely removed it with regedit. Any help would be appreciated, I don't even know where to look right now.

I'm using a legacy ECP Legacy parallel PCI Adapter EX-41021 set to address 37. I'm using the standard microsoft drivers. I tryed all Filter Resource Methodes, I Tried different LPT numbers, I Tryed plug and play detection on and off.

Thanks for any help you might provide.
Noldos
New User
Posts: 2
Joined: Wed Apr 03, 2019 4:52 pm

Re: inpoutx64 not working on win 10

Post by Noldos »

Nevermind, I managed to get it to work. I don't understand why it works, but whatever.
What worked in the end was to change the address on the card (jumper from 0x378 to 0x 3BC) and not change the address in the device manager... :?: oh well.
I tried this because by default windows created an LPT3 port. (changing it to LPT1 with 0x378 did not work)
User avatar
phil
Site Admin
Posts: 7611
Joined: Sun Apr 06, 2003 11:12 pm

Re: inpoutx64 not working on win 10

Post by phil »

I can only guess that maybe something else on Windows had the port open (or configured in a different mode epp/ecp etc.?) so InpOut32 couldn't open it. But its only a guess. I'm no expert on parallel ports having not really written anything for them for 20+ years back in the days of MS DOS and Windows 95 - it was all very different then!
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
Yangjing
New User
Posts: 1
Joined: Mon Nov 04, 2019 12:13 pm

Re: inpoutx64 not working on win 10

Post by Yangjing »

Noldos wrote: Tue Apr 09, 2019 2:13 pm Nevermind, I managed to get it to work. I don't understand why it works, but whatever.
What worked in the end was to change the address on the card (jumper from 0x378 to 0x 3BC) and not change the address in the device manager... :?: oh well.
I tried this because by default windows created an LPT3 port. (changing it to LPT1 with 0x378 did not work)
Hi Noldos,
I got the same error that you have. Everything seems well, but there is no trigger in the port. I use inpoutx64.dll in MATLAB. Could you give some advice about that? I'm new to programming.
takeseven
New User
Posts: 1
Joined: Sat May 01, 2021 10:18 am

Re: inpoutx64 not working on win 10

Post by takeseven »

Since inpoutx64.dll and inpout32.dll are no valid assembly or COM components you can't import them using the project references.

You need to import the functions of the dll in code like

[DllImport("inpout32.dll", EntryPoint = "Inp32")]
private static extern int Input(int adress);

[DllImport("inpout32.dll", EntryPoint = "Out32")]
private static extern void Output(int adress, int value);
Post Reply