home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / pascal / 8420 < prev    next >
Encoding:
Text File  |  1993-01-21  |  1.5 KB  |  40 lines

  1. Newsgroups: comp.lang.pascal
  2. Path: sparky!uunet!utcsri!torn!news.ccs.queensu.ca!slip207.telnet1.QueensU.CA!dmurdoch
  3. From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
  4. Subject: Re: Help! How to increase # of file handles in BP7 protected mode?
  5. Message-ID: <dmurdoch.330.727668232@mast.queensu.ca>
  6. Keywords: DPMI File Handles
  7. Lines: 26
  8. Sender: news@knot.ccs.queensu.ca (Netnews control)
  9. Organization: Queen's University
  10. References: <C182J4.Jyw@ccu.umanitoba.ca>
  11. Distribution: all
  12. Date: Fri, 22 Jan 1993 02:03:53 GMT
  13.  
  14. In article <C182J4.Jyw@ccu.umanitoba.ca> umbrzez0@xenon.cs.umanitoba.ca (Andrzej Brzezinski) writes:
  15.  
  16. >I have a real problem. I am using Borland Pascal 7.0 to write a protected-
  17. >mode application. I need to increase the number of file handles (to at least
  18. >50). I tried to use DOS function Set Handles Count (DOS >= 3.3):
  19. >var
  20. >  R :Registers;
  21. >begin
  22. >  R.AX := $67; { DOS function number }
  23. >  R.BX := 50; { number of file handles }
  24. >  MsDos(R);
  25. >  ....
  26. >end.
  27.  
  28. >Can anybody tell me why it does not work and how to accomplish the task?
  29.  
  30. One possibility is that you've put the function number in AL, not AH.  But
  31. assuming that's just a typo above, it's likely that it's failing because 
  32. there isn't enough free memory available to DOS to allocate a new file 
  33. table.  In real mode, it's easy to free up memory for DOS (use SetMemTop), 
  34. but I'm not sure how you'd do it in protected mode.
  35.  
  36. You should examine the error code being returned:  the carry flag will be 
  37. set if there's an error, and AX will contain the code.
  38.  
  39. Duncan Murdoch
  40.