During an internal discussion about .CAB files, someone mentioned that a Windows Mobile CAB can contain upto 998 files. I was curious to know what's special about the number 998. After some follow up, I found the answer:
If you've ever looked at a CAB using utilities like WinZip or WinRAR, you'll notice that the compressed files inside are stored using 8.3 filenames. The extension is numerically incremented starting from "000". Therefore, the max number of source files (not including _setup.xml) is 1000, with the highest extension being "999". However, the "999" extension is reserved for a single setup.dll - if it exists.
So that explains why the 998 file restriction exists. Hopefully no one will run into this, but it's still nice to know.