CeGCC编译的DLL在Windows Mobile6.1等系统中无法加载,提示“不是一个有效的Pocket PC应用程序”。

解决方法参见:http://cegcc.sourceforge.net/docs/faq.html
18.DLL doesn't work with Windows Mobile 6.1

Memory management changes in Windows Mobile 6.1 cause some DLLs not to load. It has been suggested (see this blog that the underlying problem is a writable code section in the DLL, other reports suggest that the DLL size may be an issue.

The workaround or solution (I'm not sure what to call it) that we have is to restrict this DLL to Slot 0 by adding the following registry key:

       [HKEY_LOCAL_MACHINE\System\Loader\LoadModuleLow] "MyDll.dll"=dword:1
     
Obviously you need to change "MyDll" into the name of the DLL that causes the problem.
Please note that using the this approach will force your entire DLL into Slot 0 and, it may prevent other modules from loading in that slot. Therefore, the above registry setting should be used with caution.

---------------------------------------------------------------
如下是CeGCC编译的ffmpeg需要设置的注册表项:

[HKEY_LOCAL_MACHINE\System\Loader\LoadModuleLow]
"avutil-49.dll"=dword:00000001
"swscale-0.dll"=dword:00000001
"libgcc_s_sjlj-1.dll"=dword:00000001
"avcodec-51.dll"=dword:00000001

本文链接地址: CeGCC编译的DLL在Windows Mobile6.1等系统中无法加载
http://qingfengju.com/index.asp?id=259

分类:嵌入式/电子 查看次数:8161 发布时间:2011-10-19 13:08:51