home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / alt / msdos / programm / 2223 < prev    next >
Encoding:
Internet Message Format  |  1992-08-17  |  2.3 KB

  1. Xref: sparky alt.msdos.programmer:2223 comp.os.msdos.programmer:8673 comp.lang.pascal:4936
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!mips!swrinde!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!matt.ksu.ksu.edu!news
  3. From: holland@matt.ksu.ksu.edu (Rich Holland)
  4. Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer,comp.windows.ms.programmer,comp.lang.pascal
  5. Subject: Windows and printscreen
  6. Message-ID: <17192mINN2ut@matt.ksu.ksu.edu>
  7. Date: 20 Aug 92 23:15:34 GMT
  8. Sender: holland@matt.ksu.ksu.edu (Rich Holland)
  9. Organization: Kansas State University
  10. Lines: 37
  11. NNTP-Posting-Host: matt.ksu.ksu.edu
  12.  
  13. When I started out, my task seemed simple enough!  i've got a 286 with 
  14. MS-Win 3.0 installed and I've got to dial up a mainframe and ocasionally
  15. get a printout of something.  It's such a hassle to hit PRTSCR, swap
  16. back to windows, go into notepad, hit EDIT-PASTE-FILE-PRINT, and then
  17. swap back to my program.  I figured it'd be pretty easy to intercept the
  18. PRTSCR keypress by writing a "shell" around my comm program.
  19.  
  20. Here's what I thought I'd do (in TP5.5):
  21.  
  22.   .  Copy the Int 05h vector (should point to window's routine)
  23.   .  Put ROM vector back in table (F000h:FF54h)
  24.   .  Exec() the "comm" program (or any program, really)
  25.   .  Restore the Int 05h vector for windows and exit
  26.  
  27. This should have the effect of sending the screen contents to the 
  28. printer rather than to window's clipboard.  Additionally, I could
  29. have it take a '-c' switch (for 'c'lipboard) to also call the
  30. old windows interrupt and send it to the clipboard after it prints
  31. it....
  32.  
  33. Easy, right?  WRONG.  I went into windows and did FILE-RUN and         
  34. specified COMMAND.COM -- got a shell to DOS from within Win30.
  35. I dumped the vector table via debug (debug, d0:0, q) and found
  36. that the Int 05h vector was *STILL* pointing to F000h:FF54h!
  37. And Win30 was *still* capturing the screen dumps!
  38.  
  39. How the heck's it doing that?  Am I going about this all wrong?
  40. Any suggestions/ideas?  I s'pose I could use "Snipper" from PC-Mag,
  41. but that's just one more hassle, i think...
  42.  
  43.  -- Rich
  44.  
  45. -- 
  46. Rich Holland              | INTERNET: holland@matt.ksu.ksu.edu
  47. 100 Jardine Terr, Apt A7  | BITNET  : holland@ksuvm
  48. Manhattan, KS  66502-3357 | UUCP    : ...!rutgers!matt.ksu.ksu.edu!holland
  49. "Jesus saves...but Gretzky gets the rebound!  He shoots!  He scores!!"
  50.