My x64 port of InpOut32

My x64 port of InpOut32
Post Reply
User avatar
phil
Site Admin
Posts: 7611
Joined: Sun Apr 06, 2003 11:12 pm

My x64 port of InpOut32

Post by phil »

More details here

This was orriginally produced by Logix4U
--[ 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)
kclim
New User
Posts: 1
Joined: Mon Jul 03, 2006 4:01 am

Post by kclim »

I am trying to use your 64 bit of inpout32.h and always encounter the following error message during compiling:

d:\\I2C\\XP\\x64\\inpout32.h(8) : error C2143: syntax error : missing ';' before '__stdcall'
d:\\I2C\\XP\\x64\\inpout32.h(8) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
d:\\I2C\\XP\\x64\\inpout32.h(8) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
d:\\I2C\\XP\\x64\\inpout32.h(10) : error C2143: syntax error : missing ';' before '__stdcall'
d:\\I2C\\XP\\x64\\inpout32.h(10) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
d:\\I2C\\XP\\x64\\inpout32.h(10) : error C2065: 'ULONG' : undeclared identifier
d:\\I2C\\XP\\x64\\inpout32.h(10) : error C2146: syntax error : missing ')' before identifier 'port'
d:\\I2C\\XP\\x64\\inpout32.h(10) : warning C4229: anachronism used : modifiers on data are ignored
d:\\I2C\\XP\\x64\\inpout32.h(10) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
d:\\I2C\\XP\\x64\\inpout32.h(10) : error C2059: syntax error : ')'
.\\TestOut.cpp(9) : error C2143: syntax error : missing ';' before '{'
.\\TestOut.cpp(9) : error C2447: '{' : missing function header (old-style formal list?)

Is there anything wrong? I am using Microsoft Vision Studio 2005
User avatar
phil
Site Admin
Posts: 7611
Joined: Sun Apr 06, 2003 11:12 pm

Post by phil »

Hi kclim,

This is very odd... Maybe I have missed something in the header but its strange because it compiles for me fine in VS2005. I'm at work right now but Ive had a quick look and it does appear I have missed the semi-colons at the end of the following two lines...

UCHAR _stdcall DlPortReadPortUchar (ULONG port) ;
void _stdcall DlPortWritePortUchar(ULONG port, UCHAR Value) ;

Now im confused how it compiled for me - maybe I included an old version of the header in the zip file...

Try putting them in and see if it helps... If not it will have to wait till I get home from work.

Thanks,
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)
shinichi
New User
Posts: 1
Joined: Tue Aug 30, 2011 3:43 am

Re: My x64 port of InpOut32

Post by shinichi »

Hi Phil,

I use Visual Studio 2005, too. And I got the same error messages during compiling inpout32.h.
Do you have any suggestion for advance?

Thanks.
Vincent
User avatar
phil
Site Admin
Posts: 7611
Joined: Sun Apr 06, 2003 11:12 pm

Re: My x64 port of InpOut32

Post by phil »

Well it worked last time I tried (about 3 weeks ago).
There is a working C++ example on my website of using InpOut32 in runtime linking (no need to compile against the header). Have a look at that.

Thanks,
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)
ZulhilmyMohamed
New User
Posts: 4
Joined: Tue Jul 22, 2014 4:45 am

Re: My x64 port of InpOut32

Post by ZulhilmyMohamed »

Hello, i'm still new in this forum, to be honest, i'm really new to programming. I just want to ask, can i use this solution of win 7 x64 using microsoft visual studio 2003 to access the parallel port ?

Thanks in advance! :)
User avatar
phil
Site Admin
Posts: 7611
Joined: Sun Apr 06, 2003 11:12 pm

Re: My x64 port of InpOut32

Post by phil »

I think you can, but the DLL is compiled with VS2005 or 2008. That shouldn't matter.
The C++ example on my website should work fine.

Are you trying to produce a 64bit program or a 32bit one? IIRC, 2003 is a bit of a pain to build for 64bit!

Thanks,
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)
ZulhilmyMohamed
New User
Posts: 4
Joined: Tue Jul 22, 2014 4:45 am

Re: My x64 port of InpOut32

Post by ZulhilmyMohamed »

Hello again, thanks for the reply.

Sorry, I'm not sure bout that, i'm asking on behalf of the company i work at. They have already used inpoutx32.dll to access parallel port before this with Windows XP 32bit to control the movement of laser in their machine. Now they want to upgrade to Windows 7 64bit and suffer a problem in accessing the parallel port. Therefore, to continue accessing the parallel port, the step needed is just install your driver right? Do we need to alter the codes? Or can we just continue using the previous codes as the previous code has already been written to make use of InpOut32.dll for win XP 32bit.

Thanks!
Last edited by ZulhilmyMohamed on Tue Jul 22, 2014 10:38 am, edited 1 time in total.
User avatar
phil
Site Admin
Posts: 7611
Joined: Sun Apr 06, 2003 11:12 pm

Re: My x64 port of InpOut32

Post by phil »

OK so it sounds like you just want your existing 32bit program/code and a 32bit process running on Windows 7 x64 - thats fine.

It might depend on what version of InpOut32 you were using. Was it my port or the original one from Logix4U?
In theory you should just have to replace the DLL with my 32bit one (which includes a 64bit driver).
You will have to run the "InstallDriver.exe" included, or run your program elevated with admin acess at least once for the driver to be installed.

And it depends how your software linked to the DLL. If it used runtime linkage (loadlibrary etc) then you probably don't even need to recompile. If you used standard linkage then you will need to recompile against the new lib/dll (which is a shame and less "portable").

Let me know how you get on.

Thanks,
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)
ZulhilmyMohamed
New User
Posts: 4
Joined: Tue Jul 22, 2014 4:45 am

Re: My x64 port of InpOut32

Post by ZulhilmyMohamed »

I believe the InpOut32 used for now is the original one. To be safe, I'll just replace it with yours and install the driver.

And for the linkage, they just gave me the codes, unfortunately it seems like they use the standard linkage. I'll try recompile and access the parallel port with your solution. I'll update and get back to u once i got the news.

Thanks again for your attention and time.
ZulhilmyMohamed
New User
Posts: 4
Joined: Tue Jul 22, 2014 4:45 am

Re: My x64 port of InpOut32

Post by ZulhilmyMohamed »

Hello,

Sorry for the late update, I just managed to find the free device to use to test your solution. And as expected, it works perfectly!Following your instructions, I just recompile the program with your InpOut32, and install the driver.

Can't thank you enough. Really appreciate it. Thanks phil.
Post Reply