Win32 how big custom resource can be?
===

Trying to create something similar to SFX (self extract installer), I was including the setup files in one exe using custom resource in visual c++.  When the size of the setup files reached over ~900 MB, the linker cannot generate an exe with the resources embedded.  Strange thing is that the linker does generate an exe without any warnings.  The exe generated is an statically linked MFC App (main app of the exectuable).  However, non of the resource is included.  I have watched the exe size during the linking from a console.  It was showing 900 MB for awhile befored dropped to the 2MB exe in the end.  If I removed some of the files (say total size will be 500MB), the exe is generated all OK with all the resources embedded.  Is there a pratical size limit for the custom resource.  Note the final size of the executable is about 1GB which is way less that 2GB win32 app can address.  So I am wondering is this a vc++ 2010 bug or feature?  BTW, I also used /expectedoutputsize trick.  But it does not help except the linking is much faster with a bigger expected output size.