Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

outp();

Posted on 2000-03-15
12
Medium Priority
?
369 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

705 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