home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sdd.hp.com!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!hamblin.math.byu.edu!yvax.byu.edu!cunyvm!psuvm!kdw103
- Newsgroups: comp.os.ms-windows.programmer.misc
- Subject: trapping interrupts - more
- Message-ID: <93026.220116KDW103@psuvm.psu.edu>
- From: <KDW103@psuvm.psu.edu>
- Date: Tue, 26 Jan 1993 22:01:16 EST
- Organization: Penn State University
- Lines: 51
-
- Thanks to all of you who offered suggestions on my problem. Unfortunately,
- I have still not been able to make any progress. I am posting again to give
- more details in hopes that someone may still be able to help.
-
- My isr is in a dll. I have the segment decalred as FIXED in the def file.
- It was suggested that I still need to use GlobalPageLock. I am attempting
- this with the following lines of code:
-
-
- HGLOBAL hCS;
-
-
-
- _asm mov hCS, cs
-
- GlobalPageLock(hCS);
-
- Is this the correct way to do this?
-
- I have been told that the only thing I may call during an interrupt is
- PostMessage. Am I allowed to call OutputDebugString??? This isn't the
- problem anyway. If I take them out, it still crashes.
-
- I am not worried about making this as bullet proof as some have suggested.
- Once the interrupt is enabled, the next press of the mouse button will cause
- the program to disable it, so I don't have to worry about switching to a dos
- prompt or anything like that.
-
- I am using INT 21h to set the interrupt vector. Is there some other way
- I should do this?
-
- Now for an explination of what is happening. The isr is supposed to fill
- data buffers with info each time an interrupt occurs, then it sets a bit in
- a header to indicate that the buffer is done. The program using the driver
- keeps checking the bit to see when the data is ready, then it saves it to a
- file or something, I don't have the code for the calling program. The isr
- works with no problem if it never sets the bit to indicate the data is ready.
- Of course, the calling program never knows there is any data either. When I
- add the line that sets the bit, the isr gets called, fills the buffer, marks
- it as being done, and exits. Then the computer crashes. I have seen the
- message "No rom basic, system halted" quite a bit recently. Why would it give
- me this message? It will crash in other ways depending on what other programs
- are in memory at the time (such as Dr.Watson, and WinDebug) sometimes the
- whole system freezes, the mouse cursor included.
-
- Please, help me. I have been stuck on this for weeks. I am getting really
- frustrated. Any comments are appreciated. If anything is unclear from my
- description, or if you need more info, please let me know.
-
- Thank You,
- Keith (kdw103@psuvm.psu.edu)
-