Solved

Interruptions (Visual C++ 4.2)

Posted on 1997-03-03
4
249 Views
Last Modified: 2013-12-03
I have to control an own ISA card. I have programmed interruptions with BC++ but I tryed with VC++ but it didn't work. I tryed with C files.

I want to know what instructions I have to use and what options I have to choose when I compile.
0
Comment
Question by:jcordon
[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
  • 2
4 Comments
 
LVL 3

Expert Comment

by:sperling
ID: 1334187
Is this win16, win95 or win nt? You cannot control HW inside an user-mode Win32 app, you'll need to write a VxD(95) or driver(NT)
0
 

Author Comment

by:jcordon
ID: 1334188
I'm working with windows 95.
Are you sure that this is the only way?

Can't I use rutines like in BC++ :
For example with "interrupt" , "intdosx" or something like that.
0
 

Author Comment

by:jcordon
ID: 1334189
I'm working with windows 95.
Are you sure that this is the only way?

Can't I use rutines like in BC++ :
For example with "interrupt" , "intdosx" or something like that.
0
 
LVL 2

Accepted Solution

by:
amartin030297 earned 100 total points
ID: 1334190
You are approaching your problem from a DOS perspective rather than Windows (err.. "User", "Client", or "Ring3").

What you are executing when you build a win32 application is
running is "User" space.  The whole concept of directly controlling interrupts doesn't apply to you. (Oh my God you say!). But when you think about it, what if someone starts
say.... two or three instances of your app! Or worse, what if
someone is sharing that interrupt w/you.

The answer? Well-- since you're using Windows 95, you'll need
to write a VxD (much more simple/documented than writing an
NT Driver IMHO).  I recommend you purchase either the MS Device Driver Kit, or but Vireo's VToolsD (www.vireo.com) for about $400.

So-- what happens is your VxD (which is just simple C or C++ code if you buy Vireo-- I wrote and I/O trapper in minutes!) actually traps the hardware interrupt, and virtualizes I/O's to your ISA card address (See VIOPort using Vireo).  Then whenever your "User" app (be or Dos or win32!) accesses the port, or uses DeviceIOCTL (just a call into your VxD), you setup a statemachine for that Virtual Machine (which is just a unique ID (err...pointer)) for whatever process sent whatever command.  Thus you can have multiple apps using your device, OR, you can not grant access to other processes when someone has "Opened" the device.. its your decision.

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…

726 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