自动
手动
禁用。。
如何操作,
我找不到操作的API。。
请指点一二。

解决方案 »

  1.   

    ChangeServiceConfig( 
            schService,        // handle of service 
            SERVICE_NO_CHANGE, // service type: no change 
            dwStartType,       // change service start type //这里就是启动方式
            SERVICE_NO_CHANGE, // error control: no change 
            NULL,              // binary path: no change 
            NULL,              // load order group: no change 
            NULL,              // tag ID: no change 
            NULL,              // dependencies: no change 
            NULL,              // account name: no change 
            NULL,              // password: no change 
            NULL) )            // display name: no change