Page 1 of 1

My x64 port of InpOut32

Posted: Thu Apr 27, 2006 10:28 pm
by phil
More details here

This was orriginally produced by Logix4U

Posted: Mon Jul 03, 2006 4:18 am
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

Posted: Mon Jul 03, 2006 10:39 am
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

Re: My x64 port of InpOut32

Posted: Fri Sep 02, 2011 2:50 am
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

Re: My x64 port of InpOut32

Posted: Fri Sep 02, 2011 2:54 am
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

Re: My x64 port of InpOut32

Posted: Tue Jul 22, 2014 4:53 am
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! :)

Re: My x64 port of InpOut32

Posted: Tue Jul 22, 2014 9:30 am
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

Re: My x64 port of InpOut32

Posted: Tue Jul 22, 2014 10:31 am
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!

Re: My x64 port of InpOut32

Posted: Tue Jul 22, 2014 10:37 am
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

Re: My x64 port of InpOut32

Posted: Wed Jul 23, 2014 3:46 am
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.

Re: My x64 port of InpOut32

Posted: Mon Aug 25, 2014 8:30 am
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.