Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

outp();

Posted on 2000-03-15
12
Medium Priority
?
374 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:AndrewRodionov
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:AndrewRodionov
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

Industry Leaders: 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!

Question has a verified solution.

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

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…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
Suggested Courses
Course of the Month12 days, 10 hours left to enroll

972 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