home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / os / mswindo / programm / misc / 3347 < prev    next >
Encoding:
Text File  |  1992-11-10  |  1.8 KB  |  53 lines

  1. Path: sparky!uunet!lax.pe-nelson.com!lax!twbrown
  2. From: twbrown@PE-Nelson.COM (Tom W. Brown)
  3. Newsgroups: comp.os.ms-windows.programmer.misc
  4. Subject: Re: HELP!!! Problem with acessing system memory
  5. Message-ID: <689@lax.lax.pe-nelson.com>
  6. Date: 10 Nov 92 18:14:50 GMT
  7. References: <1992Nov8.224019.28221@rhrk.uni-kl.de>
  8. Sender: news@lax.pe-nelson.com
  9. Organization: PE-Nelson
  10. Lines: 41
  11.  
  12. In article <1992Nov8.224019.28221@rhrk.uni-kl.de>, baum@kirk.es.go.dlr.de (Peter Baumann) writes:
  13. |> Hi!
  14. |> 
  15. |> I have a problem. I want to access the memory of a frame grabber installed
  16. |> to my system (BC++, Windows 3.1). I found a note in a programmers guide that
  17. |> something like this should be possible:
  18. |> 
  19. |> unsigned char far * fp;
  20. |> fp = MAKELONG(0,&_E000H);
  21. |> 
  22. |> Then I have a pointer to memory location D0000 where the frame grabber is. 
  23. |> __E000H is supposed to be a constant defined for windows. I CANT FIND IT!!!
  24. |> Does anybody out there have a def for this constant or can I access the
  25. |> memory in a different manner?
  26. |> 
  27.  
  28. The selector __E000H is an exported symbol from KERNEL, you have to provide
  29. a declaration for it:
  30.  
  31.    extern WORD __E000H;
  32.    .
  33.    .
  34.    .
  35.    {
  36.       unsigned char far *fp = MAKELONG(), &__E000H);
  37.       .
  38.       .
  39.       .
  40.    }
  41.  
  42. If this doesn't work (I've only used it for accessing __0000H locations)
  43. you may want to look into the AllocSelector(), SetSelectorBase(),
  44. SetSelectorLimit(), and FreeSelector() calls which, although I've not used,
  45. I've heard will work also.
  46.  
  47.  
  48. ----------------------------------------------------------------------------
  49. Tom Brown               |  "'ow d'you know 'e's a king?
  50. PE Nelson Systems       |            'cause 'e 'asn't got shit all over 'im!"
  51. twbrown@pe-nelson.com   |                    Monty Python and the Holy Grail
  52. ----------------------------------------------------------------------------
  53.