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
and
SERVICE_CONTROL_SHUTDOWN
when i stop the service
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