Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / inpout32.dll

Author
Message
crazzy INC
16
Years of Service
User Offline
Joined: 12th May 2008
Location:
Posted: 15th May 2008 20:24
I'm looking for some help with a hardware interface
I'm useing inpout32.dll
DBP see it loads it fine
I can call the Out32 function just fine and it works with the hardware
But when i try to call the Inp32 function DBP says it don't exist
Is this a DBP problem or inpout.dll problem
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 16th May 2008 11:19
That looks like a 3rd party DLL to me. A search of my system did not find it. The C runtime has port in/out in byte, word, and dword flavors, however.

You issue reminds me of the same sort of undocumented limitations that some hardware manufacturers use to allow you to use some functions of their device, but not all...unless you pay for their API in addition to purchasing their hardware. DATAQ, for example once offered a 4 channel A/D converter board for free. When I got mine, it was hardcoded in the sample to only work with the first channel. I overcame that limitation in much the same manner you are describing here.

Anyway, if you use "msvcrt.dll" instead of "inpout32.dll", it might work. I know that those functions work in 16-bit programs...but, I've not tried to use them in about 8 years, so I might just be wrong about that. (I suspect that they could work for ports that are not used in WinXP, however.)

Do you have a MS development system installed on your machine? If so, they are described in the "Console and Port I/O" section of the "Run-Time Library Reference" docs.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 16th May 2008 15:20
@jinzai,
It's a freely available DLL (with source code) for outputting to the parallel port.

@crazzy INC,
Can you post some DBPro code where the DLL isn't working for you? I haven't got the hardware to do any testing but it may be something we can see in the code.

crazzy INC
16
Years of Service
User Offline
Joined: 12th May 2008
Location:
Posted: 16th May 2008 21:57
First off Thank You for your replys

The first copy of inpout32.dll was bad

I downloaded a new copy of in from
http://logix4u.net/
And DBP can use the Inp32 function now

But it dose not seam to return the value i think it should



the code above returns the same values for all 3 address
the 1st address is the buffer for D7-D0 on the Printer Port
the 2nd is the Status buffer
the 3rd is the Control buffer

Any ideas would help
crazzy INC
16
Years of Service
User Offline
Joined: 12th May 2008
Location:
Posted: 16th May 2008 22:55
I'v tested the hardware with DirectIO http://www.direct-io.com/
and the test program testio32
and the hardware is working
Inputs on the status lines change the returned value of testio32
so as far as i can tell it's the Inp32 function not getting the right value
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 17th May 2008 20:45 Edited at: 17th May 2008 20:50
Nice catch, WK.

@crazzy INC : I thought that DLL name looked familiar. There are at least two versions of that DLL, written by two very different persons. Jan Axelson wrote the original one. She is a well respected technology expert and wrote the original one to go with her book for parallel port interfacing. The newer version was written by another person, and is probably a better version, as the original was written for Win95, and is likely not entirely compatible with WDM.

Port 0x378 is often for output only, and there are only 5 (iirc) pins dedicated to input on some. i.e. Not all parallel ports are bi-directional at every port address that they occupy.

I think your remaining issue is your particular parallel port. Some allow you to configure them using your BIOS setup. You want to use standard parallel port, and probably not ECP.

As a last ditch effort, you might consider trying to find a ISA card with a parallel port interface, but you should be able to reconfigure yours using your BIOS.
crazzy INC
16
Years of Service
User Offline
Joined: 12th May 2008
Location:
Posted: 18th May 2008 01:39
TY windows killer it works now
off the build my pp GUI
ty all 4 your help

will post with my finished program

Login to post a reply

Server time is: 2024-11-23 02:41:35
Your offset time is: 2024-11-23 02:41:35