Hiya,
Is there any reason for changing the calling convention of these two functions?
Yes, they are called more than once in the file, so stdcall produces smaller code (no need to duplicate the argument stack pops). Similarly any function thats only called once can be explicitly inlined for smaller code.
Should this not be #define szResLen (sizeof(szRes)/sizeof(WCHAR) -
- ?
If you want to use -1, I think that should then be
((sizeof(szRes)-1)/sizeof(WCHAR))
Since WCHARS are 2 bytes, not 1. The existing calculation looks right to me, am I missing something?
Cheers, Jon
===== "Don't wait for the seas to part, or messiahs to come; Don't you sit around and waste this chance..." - Live
jon_p_griffiths@yahoo.com
__________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com