Subject: | CreateService cannot handle more than one dependencies specified |
Repro step:
1. Win32::Daemon::CreateService({
dependencies => [qw(AFD RPCSS Tcpip)],
...});
2. Check the service created, dependency settings is not correct.
To be exact, the unfolding code is wrong (same problem in
ConfigureService also):
for( DWORD dwIndex = 0; dwIndex < dwCount; dwIndex++ )
{
_tcscpy( pszBuffer, ARRAY_GET_PV( pAv, dwIndex ) );
// _tcslen(pszBuffer) does not consider the string already in
szDependencies
// Prehaps more correct to say &pszBuffer[_tcslen( pszBuffer
)+1]
pszBuffer = &szDependencies[ _tcslen( pszBuffer ) + 1 ];
}