Solved

outp();

Posted on 2000-03-15
12
360 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 100 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
 
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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
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…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now