阅读:1464回复:1
调用CreateService发生参数错误
调用CreateService发生参数错误
schService = CreateService( SchSCManager, // SCManager database DriverName, // name of service DriverName, // name to display SERVICE_ALL_ACCESS, // desired access SERVICE_KERNEL_DRIVER, // service type SERVICE_BOOT_START, // start type SERVICE_ERROR_NORMAL, // error control type ServiceExe, // service's binary NULL, // no load ordering group NULL, // no tag identifier NULL, // no dependencies NULL, // LocalSystem account NULL // no password ); DWORD error=GetLastError(); 结果返回error=87,参数错误,上面只需要将SERVICE_BOOT_START改为SERVICE_DEMAND_START,就可以正确调用.但问题是,我需要BOOTSTART的服务. |
|
|
沙发#
发布于:2005-07-19 12:07
没人知道吗?
|
|
|