Jan 10, 2002 #2 ETasse Programmer Jan 10, 2002 17 CA I'd say use the Service Control Manager APIs: hSCM = OpenSCManager( 0, 0, GENERIC_READ ); hService = OpenService(hSCM, "Microsoft Internet Information Server", SERVICE_STOP|SERVICE_START ); boolResult = ControlService(hService, SERVICE_CONTROL_STOP, &structStatus ); /* or */ boolResult = ControlService(hService, SERVICE_CONTROL_START, &structStatus ); This is just cut'n'paste from the API docs, but should get you on your way ... Upvote 0 Downvote
I'd say use the Service Control Manager APIs: hSCM = OpenSCManager( 0, 0, GENERIC_READ ); hService = OpenService(hSCM, "Microsoft Internet Information Server", SERVICE_STOP|SERVICE_START ); boolResult = ControlService(hService, SERVICE_CONTROL_STOP, &structStatus ); /* or */ boolResult = ControlService(hService, SERVICE_CONTROL_START, &structStatus ); This is just cut'n'paste from the API docs, but should get you on your way ...