i had that code in my sources. but this code have a problem.
i compile this code and put the exe file in address of my service to run.
when i click on start of my service to run this exe file , program terminate.
see left pic.
program terminate on this line.
b = SetServiceStatus(hServiceStatus, ServiceStatus)
and show me an error.
see right pic.