应用程序在控制台中正常工作但终止于窗口服务 [英] Application works properly in console but terminate in window service

查看:96
本文介绍了应用程序在控制台中正常工作但终止于窗口服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VS 2010中使用visual c ++创建了一个控制台应用程序我添加了控制台处理程序,这样当我按下ctrl + c时,应用程序可能会成功终止并且它也适用于我而且没有错误以后我将应用程序放入窗口服务中在以下情况下调用服务控制台处理程序中的相同控制台处理程序

I made an console application in visual c++ in VS 2010 i added the console handler so that when i press ctrl+c the application may terminate successfully and it worked for me too without error later i put the application into the window service and called the same console handler in service console handler in the following the case

SERVICE_CONTROL_STOP

SERVICE_CONTROL_SHUTDOWN

当我停止时服务

i get the error HEAP CORRUPTION DETECTED:after Normal block(#119) at 0x003C5420.CRT detected that the application wrote to memory after end of heap buffer.

什么应该是错误。在此先感谢

What should be the error. Thanks in advance

推荐答案

请参阅



http://stackoverflow.com/questions/11569473/heap-corruption-detected-after-normal-block-126 [ ^ < br $> b $ b



http://stackoverflow.com/questions/11569473/heap-corruption-detected-after-normal-block-126




如果有帮助,
标记为答案。
Please refer to

http://stackoverflow.com/questions/11569473/heap-corruption-detected-after-normal-block-126[^


http://stackoverflow.com/questions/11569473/heap-corruption-detected-after-normal-block-126


mark as answer if helped.


这篇关于应用程序在控制台中正常工作但终止于窗口服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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