473,322 Members | 1,232 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

port I/O in Win95 v Win2k

Hi all,

I'm a newbie to VC++, and I'm having some trouble building an executable using some old non-visual code. I'm writing my code on a Win2k machine for use on a Win95/98 machine, using Visual C++ .NET. I'm using inp() and outp() functions from the conio.h runtime library, and they are giving me the following error:

error LNK2019: unresolved external symbol _inp referenced in function "unsigned long __cdecl read_rmd(int,int)" (?read_rmd@@YAKHH@Z)

Is this because I'm on a Win2k machine? It compiles fine in TurboC++ (Borland, I know, old school).

FYI, I'm making a function that takes in a command string and spits out a response string, for use as a .DLL with some labview code. The function controls a robot via stepper motors at a low level.

Any help would be great! Thanks!

-Fong
Nov 17 '05 #1
5 1848
Another note, a workaround might be to modify my code to activate port-level control of my stepper controller card using Win2K/NT, I think. Is this correct?

If this is so, how would I go about doing this? My controller card is on an ISA bus, and I can set its base address and IRQ via jumpers. I have an NT4.0 machine with an ISA bus in addition to my W2k and W95 (w/ ISA bus) machines.

-Fong
Nov 17 '05 #2
"Fong" <fo******@novellus.com> wrote in message
news:15**********************************@microsof t.com...
Another note, a workaround might be to modify my
code to activate port-level control of my stepper
controller card using Win2K/NT, I think. Is this correct?

If this is so, how would I go about doing this?
My controller card is on an ISA bus, and I can
set its base address and IRQ via jumpers. I have
an NT4.0 machine with an ISA bus in addition to
my W2k and W95 (w/ ISA bus) machines.


No version of NT (3.5x, 4.x, 2K, XP, 2K+3) will allow low-level direct
access to the hardware in 32 bit application. That is to say you can't try
to access the I/O ports associated with a serial or parallel device, but you
can call an API (e.g. ReadFile(), WriteFile() etc) which will call the
device driver which will do the job.

If you need to do this, you either build a driver or buy a third party
tool-kit that has kernel mode components.

(There is some emulation/virtualization that NT does for 16 bit applications
but I am not sure of the details).

Regards,
Will
Nov 17 '05 #3
Thanks Will, for your response
Unfortunately, the vendor of the card does not have a driver for NT, and don't plan on making one

So how can I make my compiler just build my code for a Win95 machine then? It compiles fine by itself, but won't put the .DLL together for me. Thank

-Fong
Nov 17 '05 #4
"Fong" <an*******@discussions.microsoft.com> wrote in message
news:E2**********************************@microsof t.com...
Thanks Will, for your response.
You are welcome.
So how can I make my compiler just build my code for a Win95 machine then?


Sorry but I won't be much help. If I remember correctly, 95 is
schizophrenic. In other words, where NT sees stability important, 95 values
compatibility with DOS more highly. So, sometimes it pretends to be a
modern, protected-mode 32 bit operating systema and sometimes it shows its
DOS heritage. I think the same NT rules apply where 32 bit applications are
concerned. However, if you have the tools, you may be able to build a 16 bit
application that does bad old DOS tricks and run it on 95. I might be wrong.

Note that _no recent_ MS compiler will build a 16 bit application, they got
out of that business at least 5 years ago.

If you want to build a driver yourself, you can order the device driver kit
from MS (~ $25 in the US) and spend 6 months wading through examples to
learn how, or you can buy a toolkit such as this (this is not a
recommendation, just an option)

http://www.compuware.com/products/driverstudio/

There are other options, too. At http:www.lvr.com you will find some info on
programming serial and parallel devices which might be useful.

Regards,
Will
Nov 17 '05 #5
Thanks again, Will

One of my friends suggested I try using "_inp" instead of "inp", "_outp" instead of "outp" in my code, but wasn't sure what it would do. I recompiled it using a global replace inserting that underscore, and now it compiles fine! Any idea what happened, and whether I will see any issues because of this? He thought it might be somehow accessing assembly level functions

I haven't had a chance to try my DLL out on my test computer yet due to some Labview issues, so I can't just test it directly at this time

-Fong
Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Tom Semple | last post by:
Apparently the current version of win32all does not work on win95 (please correct me if I am wrong). Python2.3.2 itself works fine. Does anyone happen to know the win32all version that last...
0
by: Aljosa Mohorovic | last post by:
which is last pywin32 that works on win95? i need it to access COM object and it needs to run on win95. version fox this mix would be nice, something like: python 2.3.4 -> which version pywin32 b...
0
by: Andreas Schulz | last post by:
Hi, I'm thinking of developing an application with C# under .NET. My problem is that the application also must be able to run under Windows 95. As known .NET cannot be installed under Win95. So...
21
by: The Man With The Harmonica | last post by:
Hi All, What kind of commands can I use to control the serial and parallel port of my pc. I want to use my laptop instead of microcontrollers and write my software in ANSI C to be used for...
2
by: Alan P. Summerlin | last post by:
Hello All, I am about to start a new job and one of my first tasks will be to port an old VB (for DOS) application to VB.net. I have quite a bit of experience with VB 6.0 and no experience with...
3
by: Darren | last post by:
Hello, Will applications created using VB.NET run on Win95? Regards, Darren
5
by: john | last post by:
Hi, I am trying to use "_outp " function to write to parallel port . I am using microsoft visual C++6.0. I am using it like this _outp ( 956, 255) . I am using decimal numbers. The thing is...
12
by: david.brown.0 | last post by:
I'm trying to make a Java program access a parallel port. Java's comm API does not provide me with the control I need. I need to be able to write to the data and control pins and read the status...
5
by: Lee | last post by:
I am getting this error trying to run a win forms .net app using the .net 2.0 serial port control. This occurs when the app tries to open the port. I knwo this is some type of security access...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.