PRB: Share Buffer Exceeded

Last reviewed: July 23, 1997
Article ID: Q107694
3.10 WINDOWS kbprg kbprb

The information in this article applies to:

  • Microsoft Windows Software Development Kit (SDK) for Windows version 3.0

SYMPTOMS

In a Windows-based application, if calling SetHandleCount(x) to increase the current task's file handle table to be able to open "x" number of files, even though the call returned success, "x" number of files still cannot be opened. Instead, the MS-DOS error 0x24 is encountered:

   Sharing Buffer Exceeded

CAUSE

The MS-DOS error 0x24 "Sharing Buffer Exceeded" occurs because of the MS- DOS SHARE (SHARE.EXE) utility. SHARE maintains a table containing the fully qualified pathname, plus 11 bytes, of each open file in the system. By default, the size of this table when the SHARE utility gets loaded is only 2048 bytes. When SHARE runs out of this buffer while opening a file, the above error message is displayed.

RESOLUTION

Increase the default size of the internal buffer that SHARE uses via the /F:nnnn command-line argument to SHARE.EXE. Then, a Windows-based application should be able to open more files at one time. The SHARE utility is documented both in the MS-DOS "User's Guide" and the MS-DOS "User's Reference" manuals. For example, adding the following line in the AUTOEXEC.BAT file will set share's internal buffer size to 10,000 bytes.

   C:\DOS\SHARE.EXE /F:10000


Additional reference words: 3.10 sft 36
KBCategory: kbprg kbprb
KBSubcategory: KrFileIO
Keywords : kb16bitonly


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 23, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.