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

Function Ext2StartService

Ext2Mgr/enumDisk.cpp:3004–3035  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3002
3003
3004BOOL
3005Ext2StartService(CHAR *service)
3006{
3007 BOOL rc = FALSE;
3008 SC_HANDLE scmHandle = NULL;
3009 SC_HANDLE drvHandle = NULL;
3010
3011 scmHandle = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
3012 if (!scmHandle) {
3013 goto errorout;
3014 }
3015
3016 drvHandle = OpenService(scmHandle,
3017 service,
3018 SERVICE_ALL_ACCESS);
3019 if (!drvHandle) {
3020 goto errorout;
3021 }
3022
3023 rc = (0 != StartService(drvHandle, 0, NULL));
3024
3025errorout:
3026
3027 if (drvHandle)
3028 CloseServiceHandle(drvHandle);
3029
3030 if (scmHandle) {
3031 CloseServiceHandle(scmHandle);
3032 }
3033
3034 return rc;
3035}
3036
3037BOOL
3038Ext2StartExt2Srv()

Callers 3

Ext2InstallExt2SrvFunction · 0.70
Ext2StartExt2SrvFunction · 0.70
Ext2StartExt2FsdFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected