Solved

Interruptions (Visual C++ 4.2)

Posted on 1997-03-03
4
247 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
  • 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Suggested Solutions

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

789 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