home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2389 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.4 KB

  1. Path: comma.rhein.de!serpens!not-for-mail
  2. From: mlelstv@serpens.rhein.de (Michael van Elst)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Amiga Memory Map Needed!!!
  5. Date: 31 Jan 1996 00:25:27 +0100
  6. Organization: dis-
  7. Message-ID: <4em9d7$6m8@serpens.rhein.de>
  8. References: <310495eb@gauss.demon.co.uk> <1109oaw60.alamito@marketgraph.xs4all.nl> <4eisdt$dkn@sunsystem5.informatik.tu-muenchen.de> <4ejjom$na7@serpens.rhein.de> <4elp51$8vn@sunsystem5.informatik.tu-muenchen.de>
  9. NNTP-Posting-Host: serpens.rhein.de
  10.  
  11. fischerj@informatik.tu-muenchen.de (Juergen "Rally" Fischer) writes:
  12.  
  13. >The oposite question came to me programming createproc(). Is the task
  14. >I created allowed to use libhandles my main task got ? windowhandles ? etc ?
  15.  
  16. Not always.
  17.  
  18. For libraries it depends on the library. Some do require one open per task.
  19. Since lots of code depends on sharability of library bases it's pretty impossible
  20. to change behaviour of most existing libraries though.
  21.  
  22. Sharability of other handles isn't really defined. For example windows are
  23. bound to a task with their user port. So while it is possible to examine
  24. a window from a different task you cannot receive events from the window.
  25. For compatibility with a future protected system I suggest that you do not
  26. call any window operations from a task that didn't open the window. Using
  27. the window handle as a reference (say for a system requester) should be safe.
  28.  
  29. >you mean careful in the sense of storing each individual given ptr to
  30. >use close on it ?
  31.  
  32. Yes. You also must not use data created by one instance of the library in
  33. calls to another instance. Example: the socket.library maintains for you
  34. a list of socket handles. Each opener gets his own list. A socket handle
  35. created by one library instance is invalid for a different instance.
  36.  
  37. >The reason why I want to do multi-open is I want to have independent
  38. >software modules that do their work (output to shell or whatever)
  39. >without the main code having to do anything for it. But main still
  40. >could also make use of the libs, so 2 or more times opening lib in
  41. >same task.
  42.  
  43. I suggest that you open the libraries once for all modules.
  44.  
  45. >|> BTW, why don't you read the RKRMs ? They do answer your questions.
  46. >mhm, I only got autodocs. is it described there ?
  47.  
  48. Most of it.
  49.  
  50. -- 
  51.                                 Michael van Elst
  52.  
  53. Internet: mlelstv@serpens.rhein.de
  54.                                 "A potential Snark may lurk in every tree."
  55.