?
Solved

outp();

Posted on 2000-03-15
12
Medium Priority
?
376 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.
0
Comment
Question by:ekinee
  • 3
  • 3
  • 2
  • +3
12 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 200 total points
ID: 2619577
a protected mode (32 bit) application doesn-t have direct access to the I/O ports, so it can't use outp().  

you need to write a device driver to do this or to find a device driver that does what you need.
0
 
LVL 2

Expert Comment

by:Andrei Rodionov
ID: 2619677
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
0
 
LVL 22

Expert Comment

by:nietod
ID: 2619698
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.)
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:Andrei Rodionov
ID: 2619719
OK. I just mean it.
0
 
LVL 9

Expert Comment

by:Pacman
ID: 2619775
ekinee,

I use a shareware-driver, called "TVicHW32" for this.
0
 
LVL 3

Expert Comment

by:LucHoltkamp
ID: 2622993
If you stick to win95/win98 you can still use outp() etc...
Luc
0
 

Expert Comment

by:padmashali
ID: 2623865
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);
0
 

Expert Comment

by:padmashali
ID: 2623897
I have assumed that you have the source code to rebuild.
0
 
LVL 22

Expert Comment

by:nietod
ID: 2623961
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.
0
 

Author Comment

by:ekinee
ID: 2624015
Yes,  as nietod said I dont want to communicate with the card through COM port, but through ISA bus.
0
 

Author Comment

by:ekinee
ID: 2624093
I've found the device driver that does what I want .

So I'm thanking.
0
 

Expert Comment

by:padmashali
ID: 2624174
Thanks nietod, and sorry for not understanding the Q and answering.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question