Microsoft Layer for Unicode,有没有人在MFC下使用过?

poney 2004-07-15 02:05:47
我现在要将MSLU加入我的程序中。我的程序是用VC6开发的MFC应用程序,已经打了SP6补丁。

可是,现在在网上找到的资料太少了。

我重新编译了CRT、MFC,但是程序还是不能在98下运行。

微软的“Compiling Your Application with the Microsoft Layer for Unicode”我也照做了,但是不知道是否漏掉了什么?

希望有过使用MSLU经验的朋友能指点一下。

多谢。
...全文
128 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
gracezhu 2004-07-15
  • 打赏
  • 举报
回复
http://dev.csdn.net/Develop/article/18/18636.shtm
poney 2004-07-15
  • 打赏
  • 举报
回复
modena(非云):
你提供的信息我看过了。也做过了。
但是我的程序好像没有在98下加载MSLU。
是不是我还是漏掉了什么东西?
poney 2004-07-15
  • 打赏
  • 举报
回复
请问谁有例子代码吗?

我在COM之家上面看到有,但是现在它的下载链接已经失效了。
modena 2004-07-15
  • 打赏
  • 举报
回复
To control loading MSLU or use side-by-side assemblies

Add the following code to your application:
#ifdef _cplusplus
extern "C" {
#endif
extern FARPROC _PfnLoadUnicows = (FARPROC) &LoadUnicowsProc;
#ifdef _cplusplus
}
#endif
Define the LoadUnicowsProc function. This function is a user-defined callback function that takes no parameters. The loader calls it when needed to load the Microsoft Layer for Unicode. Note that LoadUnicowsProc is only called on Windows 95/98/Me. Also, LoadUnicowsProc is called before the DllMain PROCESS_ATTACH call and, for an .exe, before WinMain.
HMODULE LoadUnicowsProc(void);
The following is a typical implementation of LoadUnicowsProc.
HMODULE LoadUnicowsProc(void)
{
return(LoadLibraryA("unicows.dll"));
}
Note that you must call LoadLibraryA and all other Ansi APIs explicitly. This is because compiling as Unicode defines APIs like LoadLibrary as LoadLibraryW. For more information, see Conventions for Function Prototypes.

If you load the Unicows.lib in this manner, you must never call any of the APIs that the Microsoft Layer for Unicode itself wraps. Doing so leads to a stack overflow because your callback calls the loader which calls your callback, and so forth.

modena 2004-07-15
  • 打赏
  • 举报
回复
没用过,不过至少Win98是不支持Unicode的
simouse 2004-07-15
  • 打赏
  • 举报
回复
Win98不支持的东西多了

16,473

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧