MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / ManagerReportStatus

Function ManagerReportStatus

Ext2Mgr/Ext2Mgr.cpp:59–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57
58
59BOOL
60ManagerReportStatus(
61 SERVICE_STATUS_HANDLE Handle,
62 SERVICE_STATUS* Status,
63 DWORD State,
64 DWORD Exitcode,
65 DWORD Timeout
66 )
67{
68 // If we're in the start state then we don't want the control manager
69 // sending us control messages because they'll confuse us.
70 if (State == SERVICE_START_PENDING) {
71 Status->dwControlsAccepted = 0;
72 } else {
73 Status->dwControlsAccepted = SERVICE_ACCEPT_STOP;
74 }
75
76 // Save the new status we've been given
77 Status->dwCurrentState = State;
78 Status->dwWin32ExitCode = Exitcode;
79 Status->dwWaitHint = Timeout;
80
81 // Update the checkpoint variable to let the SCM know that we
82 // haven't died if requests take a long time
83 if ((State == SERVICE_RUNNING) || (State == SERVICE_STOPPED)) {
84 Status->dwCheckPoint = 0;
85 } else {
86 Status->dwCheckPoint = Checkpoint++;
87 }
88
89 // Tell the SCM our new status
90 return SetServiceStatus(Handle, Status);
91}
92
93void ManagerStopService()
94{

Callers 3

ManagerCtrlServiceFunction · 0.85
ManagerStartMainFunction · 0.85
ManagerServiceEntryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected