Bugfix: CString.ReleaseBuffer is NOT called after CString.GetBuffer, but it should be safe in this particular code routine
typo. How can this work before?
Bugfix: The third parameter of _snprintf_s should be buflen-1. But we cannot be wrong with _TRUNCATE.
This reduces the DLL by about 18K
Explicit template instantiation: typedef along does NOT do that.
Explicit template instantiation on CAtlList/CAtlArray causes unresolved external symbols ...
Should improve compile speed a little bit
This cuts down 2K binary size
Consistently use c style string. This cuts 1K binary size.
Always past input CString parameter as const ref, even if we have to copy before modify it. This cuts 1K binary size.
Use const ref in function parameter when it is possible & change a CStringW parameter to LPCWSTR. This cuts down 3-4K binary size.
This cuts about 0.5K
Pass CStringT function parameter as const ref & rewrite some string operations. This should cut down a bit of the binary size (no more then 1K)
Consistently use safe version of *scanf. This cuts down 4K binary size.