PRB: CAB SDK Headers Contain Incorrect CB_MAX_DISK Value

Last reviewed: January 19, 1998
Article ID: Q174866
The information in this article applies to:
  • Internet Client SDK, versions 4.0, 4.01

SYMPTOMS

When compressing data using Fci.lib from the Cabinet (CAB) SDK, a new cabinet file is started after about 134 MB of data has been compressed.

CAUSE

Fci.h contains an incorrect definition for CB_MAX_DISK. The value is defined as 0x7FFFFFFL (134,217,727) instead of 0x7FFFFFFFL (2,147,483,647) as it should be. CB_MAX_DISK is also defined incorrectly in this way in Fdi.h.

RESOLUTION

Redefine CB_MAX_DISK to the correct value of 0x7FFFFFFFL:

   #define CB_MAX_DISK 0x7FFFFFFFL

STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Specifying a value of 0 for disk size (cb value in CCAB struct) resets the value to CB_MAX_DISK. However, CB_MAX_DISK is defined incorrectly as 0x7FFFFFFL or 134,217,727. It should be 0x7FFFFFFFL, or 2,147,483,647. Data compression proceeds to about 134 Mb, then it switches to a new cabinet. The desired result of a larger cabinet (CAB) can be obtained by explicitly supplying the correct larger value.

Note that a CAB can normally contain at most 65,500 or so files. There is no code in FCI to avoid exceeding this value, so the user application may have to enforce it.

Also note that unless a CAB will be randomly extracted, cbFolderThresh should be explicitly set to a very large value. If the CAB will be randomly extracted, values between 100 K and 1 Mb would be appropriate.

REFERENCES

For more information about cabinets and the CAB SDK, see the following Web site:

   http://www.microsoft.com/workshop/prog/cab/

Keywords          : InetSDKCAB
Technology        : kbInetDev
Version           : WINDOWS:4.0,4.01
Platform          : WINDOWS
Issue type        : kbprb


================================================================================


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: January 19, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.