VC6.0默认编码格式是ANSI,在网上查到的设置成Unicode编码格式的方法分为两步:
<!--[if !supportLists]-->1. <!--[endif]-->将_MBCS宏改成_UNICODE,UNICODE
<!--[if !supportLists]-->2. <!--[endif]-->设置程序的入口点为wWinMainCRTStartup。
于是在做unicode编码的dll时也采用上述方法,结果使用该动态库的Unicode程序一运行就自动退出。在网上查找终于找到原因:
如果.exe程序使用Unicode编码设置了程序的入口点,那么其使用的动态库在设置Unicode编码时只需要定义宏,不需要再设置程序入口点。