please dont rip this site Prev Next

SetServiceStatus info  Overview  Group

The SetServiceStatus function updates the service control manager’s status information for the calling service.

BOOL SetServiceStatus(

    SERVICE_STATUS_HANDLE hServiceStatus~,

// service status handle

    LPSERVICE_STATUS lpServiceStatus 

// address of status structure

   );

Parameters

hServiceStatus~
Specifies a handle to the service control manager’s status information structure for the current service. This handle is returned by the RegisterServiceCtrlHandler function.
lpServiceStatus
Points to the SERVICE_STATUS structure the contains the latest status information for the calling service.

Return Values

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Errors

The following error codes can be set by the service control manager. Other error codes can be set by the registry functions that are called by the service control manager.

Value

Meaning

ERROR_INVALID_HANDLE

The specified handle is invalid.

ERROR_INVALID_DATA

The specified service status structure is invalid.

Remarks

A ServiceMain function first calls the RegisterServiceCtrlHandler function to get the service’s SERVICE_STATUS_HANDLE. Then it immediately calls the SetServiceStatus function to notify the service control manager of its SERVICE_START_PENDING status.

When a service receives a control request, the service’s Handler function must call SetServiceStatus, even if the service’s status did not change. A service can also use this function at any time and by any thread of the service to notify the service control manager of status changes. Examples of such unsolicited status updates include:

A service can call this function only after it has called RegisterServiceCtrlHandler to get a service status handle.

See Also

Handler, RegisterServiceCtrlHandler, SERVICE_STATUS, ServiceMain, SetServiceBits 

 


file: /Techref/os/win/api/win32/func/src/f81_20.htm, 4KB, , updated: 2000/4/7 12:19, local time: 2024/4/24 05:48,
TOP NEW HELP FIND: 
13.58.39.23:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://www.piclist.com/techref/os/win/api/win32/func/src/f81_20.htm"> SetServiceStatus</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

  PICList 2024 contributors:
o List host: MIT, Site host massmind.org, Top posters @none found
- Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
 

Welcome to www.piclist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .