Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
NT
apps
dfs
dns
domain
dsmnfpnw
embedded
fsft
mail
misc
oemdsp.preinstall
personalfax
print
protocol.ipx
protocol.misc
protocol.ras
protocol.routing
protocol.tcpip
registry
setup
terminalserv.app.
terminalserv.client
terminalserv.connectivity
terminalserv.domain
terminalserv.misc
terminalserv.prot.rdp
terminalserv.prot.tcpip
terminalserv.setup
terminalserv.user
windowsnt.wntsee
  
 
date: Wed, 18 Jun 2008 14:39:59 -0400,    group: microsoft.public.windowsnt.registry        back       


ServiceGroupOrder?   
Hi All,

    I have created a service with a start value = 2 (SERVICE_AUTO_START). 
The service calls the Windows function WSAStartup which initates the use of 
the Winsock.dll.  If I add my service to a group I can control when it gets 
started by adding it into the following list that is in the resgistry under: 
/HKLM/SYSTEM/CurrentControlSet/ServiceGroupOrder.  Most of the groups in the 
list contain services that contain a start value of 0 (SERVICE_BOOT_START) 
or 1 (SERVICE_SYSTEM_START).  The higher a service in the list the sooner it 
loads.  All the groups with a 0 get started first, then the groups with a 1 
and then the groups with a 2.  So, a group that contains a service with a 
start value of 1 that is high in the list will not start until all the 
groups with services that have a start value of 0 get loaded.

Please see:  http://support.microsoft.com/kb/115486

My question:  if the service I have created calls the Windows function 
WSAStartup (start value of 2), where in the ServiceGroupOrder List can I 
place it so I would be sure that the proper services have already been 
started to support the WSAStartup function call?

Thanks in advance,
- Tom
date: Wed, 18 Jun 2008 14:39:59 -0400   author:   tmarin7 am

Re: ServiceGroupOrder?   
Hi,

tmarin7 wrote:
> I have created a service with a start value = 2 (SERVICE_AUTO_START). 
> The service calls the Windows function WSAStartup which initates the use of 
> the Winsock.dll.
> 
> My question:  if the service I have created calls the Windows function 
> WSAStartup (start value of 2), where in the ServiceGroupOrder List can I 
> place it so I would be sure that the proper services have already been 
> started to support the WSAStartup function call?

I think I would be investigating the "DependOnGroup" or 
"DependOnService" entries features and nominate an appropriate service 
(ie: winsock or winsock2) as the dependency for your service.

Your service then will not start until after the winsock reports start 
successful.

You may also want to build a bit of a time delay into your service 
before it attempts to make any calls. I have seen some services that do 
not like having calls made of them IMMEDIATELY after they start (test 
your situation and see what happens) - you can trigger some really weird 
behaviours like race conditions - I don't know whether the winsock would 
be in this category.

Calvin.
date: Thu, 19 Jun 2008 12:12:13 +1000   author:   Calvin

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us