home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / mswindo / programm / misc / 5440 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  2.7 KB

  1. 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
  2. Newsgroups: comp.os.ms-windows.programmer.misc
  3. Subject: trapping interrupts - more
  4. Message-ID: <93026.220116KDW103@psuvm.psu.edu>
  5. From: <KDW103@psuvm.psu.edu>
  6. Date: Tue, 26 Jan 1993 22:01:16 EST
  7. Organization: Penn State University
  8. Lines: 51
  9.  
  10.   Thanks to all of you who offered suggestions on my problem.  Unfortunately,
  11. I have still not been able to make any progress.  I am posting again to give
  12. more details in hopes that someone may still be able to help.
  13.  
  14.   My isr is in a dll.  I have the segment decalred as FIXED in the def file.
  15.  It was suggested that I still need to use GlobalPageLock.  I am attempting
  16.  this with the following lines of code:
  17.  
  18.  
  19. HGLOBAL hCS;
  20.  
  21.  
  22.  
  23.  _asm mov hCS, cs
  24.  
  25.  GlobalPageLock(hCS);
  26.  
  27.  Is this the correct way to do this?
  28.  
  29.     I have been told that the only thing I may call during an interrupt is
  30.  PostMessage.  Am I allowed to call OutputDebugString???  This isn't the
  31.  problem anyway.  If I take them out, it still crashes.
  32.  
  33.     I am not worried about making this as bullet proof as some have suggested.
  34.  Once the interrupt is enabled, the next press of the mouse button will cause
  35.  the program to disable it, so I don't have to worry about switching to a dos
  36.  prompt or anything like that.
  37.  
  38.     I am using INT 21h to set the interrupt vector.  Is there some other way
  39.  I should do this?
  40.  
  41.     Now for an explination of what is happening.  The isr is supposed to fill
  42.  data buffers with info each time an interrupt occurs, then it sets a bit in
  43.  a header to indicate that the buffer is done.  The program using the driver
  44.  keeps checking the bit to see when the data is ready, then it saves it to a
  45.  file or something, I don't have the code for the calling program.  The isr
  46.  works with no problem if it never sets the bit to indicate the data is ready.
  47.  Of course, the calling program never knows there is any data either.  When I
  48.  add the line that sets the bit, the isr gets called, fills the buffer, marks
  49.  it as being done, and exits.  Then the computer crashes.  I have seen the
  50.  message "No rom basic, system halted" quite a bit recently.  Why would it give
  51.  me this message?  It will crash in other ways depending on what other programs
  52.  are in memory at the time (such as Dr.Watson, and WinDebug) sometimes the
  53.  whole system freezes, the mouse cursor included.
  54.  
  55.    Please, help me.  I have been stuck on this for weeks.  I am getting really
  56.  frustrated.  Any comments are appreciated.  If anything is unclear from my
  57.  description, or if you need more info, please let me know.
  58.  
  59.     Thank You,
  60.         Keith (kdw103@psuvm.psu.edu)
  61.