We help IT Professionals succeed at work.

outp();

ekinee
ekinee asked
on
395 Views
Last Modified: 2010-04-02
I have an application written for win16. In this program I use outp in order to give add on card information. However this does not work with win32. Could someone describe me how this should be done.
Comment
Watch Question

Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Just a suggestion...

Can you make your old Win16 code into 16-bit DLL and then mix your Win32 app with 16-bit DLL?..

It's only assumption...

Andrew

Commented:
A 32 bit app can't call a 16 bit DLL directly.  You would have to use thunks to make the call work.  (then it would work.)
OK. I just mean it.

Commented:
ekinee,

I use a shareware-driver, called "TVicHW32" for this.
If you stick to win95/win98 you can still use outp() etc...
Luc
1. Codes directly from my application so please do not confuse by the parameter names.

2. Create a handle to the port as given below.

hCommPort = CreateFile (m_PortName, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);

m_PortName can be COM1/COM2/COM3/COM4

3. Write to the port using the hCommPort handle and the WriteFile function. Configure the m_strWrite String with the details of the add-on Card.

WriteFile(hCommPort, m_strWrite, dwLength, &MyBytesWritten, NULL);
I have assumed that you have the source code to rebuild.

Commented:
padmashali, that allows you to access a communication port, not an I/O port.  The two are unrelated.  outp() allows you to access the 64k I/O ports on an x85 machine.

Author

Commented:
Yes,  as nietod said I dont want to communicate with the card through COM port, but through ISA bus.

Author

Commented:
I've found the device driver that does what I want .

So I'm thanking.
Thanks nietod, and sorry for not understanding the Q and answering.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.