在Windows CE上未调用ExitInstance方法 [英] ExitInstance method is not being called on Windows CE

查看:108
本文介绍了在Windows CE上未调用ExitInstance方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某种原因, 在Windows CE 5.0或6.0上没有调用ExitInstance。


我正在使用此方法从内存中卸载对象因为该方法没有被调用,所以程序中发生了内存泄漏。在Windows XP / Vista上,正确调用此方法。


如果容器应用程序收到标准的Windows消息WM_CLOSE,MFC库会在类破坏之前调用ExitInstance方法。这样,如果应用程序没有大量使用(例如使用kill),则应该调用此方法。在我的情况下,我通过使用File->关闭菜单或右上角的X来关闭应用程序,意味着正在发送WM_CLOSE并应调用ExitInstance。但就我而言,在Windows CE上,正在调用类破坏,但ExitInstance方法没有。


是否有我可以添加到我的MFC项目的钩子或东西,以便调用ExitInstance,并完全执行到Windows CE?

解决方案

您好,您的问题更多的是关于CE而不是XPe \标准。 看这个论坛的人们往往更多地了解Windows Embedded Standard或XP Embedded,而不是关于CE。 使用以下两种方法之一,您可能会取得更大的成功: 

这是CE开发人员中心的主页,可能是最佳起点,如果你想探索 -   http://msdn2.microsoft.com/en-us/embedded/aa731407.aspx  


< span style ="line-height:115%; font-family:'Calibri','sans-serif';颜色:#333333; font-size:9pt">      这是CE新闻组,如果您对某个区域有特定问题 - http://msdn.microsoft.com/en-us/embedded/aa731160.aspx

For some reason the ExitInstance is not being called on Windows CE 5.0 or 6.0.

I am using this method to unload objects from memory and because the method is not being called a memory leak is happening into the program. On Windows XP/Vista this method is being called properly.

If the container application receives the standard Windows message WM_CLOSE the MFC libraries call the ExitInstance method before the class destruction. In this way if the application in not drastically (E.g. Using kill), this method should be called. In my case I am closing the application by using on the File->Close menu or the X in the upper right, with means the WM_CLOSE is being sent and the ExitInstance should be called. But in my case, on Windows CE, the class destruction is being called properly but the ExitInstance method not.

Is there a hook or something I can add to my MFC project so that ExitInstance is called, and fully executed into the Windows CE?

解决方案

Hi, your question is more about CE than XPe\Standard.  The folks looking at this forum tend to know more about Windows Embedded Standard or XP Embedded and less about CE.  You probably will have better success with one of these two things: 

This is the home page of the CE developer center, probably the best starting point if you want to explore- http://msdn2.microsoft.com/en-us/embedded/aa731407.aspx 

       This is the CE newsgroup, if you have specific questions about an area-http://msdn.microsoft.com/en-us/embedded/aa731160.aspx


这篇关于在Windows CE上未调用ExitInstance方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆