please dont rip this site Prev Next

SetServiceBits info  Overview  Group

The SetServiceBits function registers a service type with the service control manager and the Server service. The Server service can then announce the registered service type as one it currently supports. The NetServerGetInfo and NetServerEnum functions obtain a specified machine’s supported service types.

A service type is represented as a set of bit flags; the SetServiceBits function sets or clears combinations of those bit flags.

BOOL SetServiceBits(

    SERVICE_STATUS_HANDLE hServiceStatus,

// service status handle

    DWORD dwServiceBits,

// service type bits to set or clear

    BOOL bSetBitsOn,

// flag to set or clear the service type bits

    BOOL bUpdateImmediately

// flag to announce server type immediately

   );

Parameters

hServiceStatus
A handle to the information structure for a service. A service obtains the handle by calling the RegisterServiceCtrlHandler function.
dwServiceBits
A set of bit flags that specifies a service type.

Certain bit flags (0xC00F3F7B) are reserved for use by Microsoft. The SetServiceBits function fails with the error ERROR_INVALID_DATA if any of these bit flags are set in dwServiceBits. The following 18 bit flags are reserved for use by Microsoft:

Reserved Bit Flag

Value

SV_TYPE_WORKSTATION

0x00000001

SV_TYPE_SERVER

0x00000002

SV_TYPE_DOMAIN_CTRL

0x00000008

SV_TYPE_DOMAIN_BAKCTRL

0x00000010

SV_TYPE_TIME_SOURCE

0x00000020

SV_TYPE_AFP

0x00000040

SV_TYPE_DOMAIN_MEMBER

0x00000100

SV_TYPE_PRINTQ_SERVER

0x00000200

SV_TYPE_DIALIN_SERVER

0x00000400

SV_TYPE_XENIX_SERVER

0x00000800

SV_TYPE_SERVER_UNIX

0x00000800

SV_TYPE_NT

0x00001000

SV_TYPE_WFW

0x00002000

SV_TYPE_POTENTIAL_BROWSER

0x00010000

SV_TYPE_BACKUP_BROWSER

0x00020000

SV_TYPE_MASTER_BROWSER

0x00040000

SV_TYPE_DOMAIN_MASTER

0x00080000

SV_TYPE_LOCAL_LIST_ONLY

0x40000000

SV_TYPE_DOMAIN_ENUM

0x80000000

Certain bit flags (0x00300084) are defined by Microsoft, but are not specifically reserved for systems software. The following are these four bit flags:

Bit Flag Constant

Value

SV_TYPE_SV_TYPE_SQLSERVER

0x00000004

SV_TYPE_NOVELL

0x00000080

SV_TYPE_DOMAIN_CTRL

0x00100000

SV_TYPE_DOMAIN_BAKCTRL

0x00200000

Certain bit flags (0x3FC0C000) are not defined by Microsoft, and their use is not coordinated by Microsoft. Developers of applications that use these bits should be aware that other applications can also use them, thus creating a conflict. The following are these 10 bit flags:

Value

Value

0x00004000

0x02000000

0x00008000

0x04000000

0x00400000

0x08000000

0x00800000

0x10000000

0x01000000

0x20000000

bSetBitsOn
Specifies whether the function is to set or clear the bit flags that are set in dwServiceBit. If this value is TRUE, the bits are to be set. If this value is FALSE, the bits are to be cleared.
bUpdateImmediately
Specifies whether the Server service is to perform an immediate update, announcing the new service type. If this value is TRUE, the update is to be performed immediately. If this value is FALSE, the update will not be performed immediately.

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.

See Also

NetServerGetInfo, NetServerEnum, RegisterServiceCtrlHandler, SetServiceStatus 


file: /Techref/os/win/api/win32/func/src/f81_18.htm, 9KB, , updated: 2000/4/7 11:19, local time: 2024/11/15 21:24,
TOP NEW HELP FIND: 
3.17.81.228: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://sxlist.com/Techref/os/win/api/win32/func/src/f81_18.htm"> SetServiceBits</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?

 

Welcome to sxlist.com!


Site supported by
sales, advertizing,
& kind contributors
just like you!

Please don't rip/copy
(here's why

Copies of the site on CD
are available at minimal cost.
 

Welcome to sxlist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .