he RegisterServiceCtrlHandler function registers a function to handle service control requests for a service. SERVICE_STATUS_HANDLE RegisterServiceCtrlHandler( LPCTSTR lpServiceName, // address of name of service
LPHANDLER_FUNCTION lpHandlerProc // address of handler function
);
ParameterslpServiceNamePoints to a null-terminated string that names the service run by the calling thread. This is the service name that was specified in the CreateService function when the service was created. lpHandlerProcPoints to the Handler function to be registered. Return ValuesIf the function succeeds, the return value is a service status handle.
If the function fails, the return value is zero. To get extended error information, call GetLastError
.
LPHANDLER_FUNCTION lpHandlerProc // address of handler function
);
ParameterslpServiceNamePoints to a null-terminated string that names the service run by the calling thread. This is the service name that was specified in the CreateService function when the service was created. lpHandlerProcPoints to the Handler function to be registered. Return ValuesIf the function succeeds, the return value is a service status handle.
If the function fails, the return value is zero. To get extended error information, call GetLastError
.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货