Solved

outp();

Posted on 2000-03-15
12
363 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

785 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