p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

sql_server thread: NT Service Dependency with SQL Server 7.0


Message #1 by howard smalley <howard.smalley@q...> on Tue, 30 Jan 2001 09:40:00 +0000
Hi All

The NT service I've developed depends on the SQLServer 7.0 service
(SQLServerAgent) being started first. To implement this I specfied the
SQLServerAgent in the dependencies parameter of the CreateService() SCM
API call, see below:

 hService = CreateService(
  hSCM,
  m_service,
  m_display,
  SERVICE_ALL_ACCESS,
  dwType,
  dwStart,
  SERVICE_ERROR_NORMAL,
  szFilePath,
  NULL,
  NULL,
  lpDepends,
  lpName,
  lpPassword );

where the lpDepends is, SQLServerAgent\0\0, (the CreateService function
specifies it must be a double null terminated string).

Unfortuneatly this still doesn't work!

Any help on this problem would be greatly appreciated.

Thanks
Howard




  Return to Index