Archived from groups: microsoft.public.win2000.security (
More info?)
"Chris" <Chris@discussions.microsoft.com> wrote in message
news:EF72359D-49E0-472D-B0BA-FD5ADB4714B1@microsoft.com...
> Thank you! That was very quick!!
>
> I hate to be a doof - but, which is the 'log on as' parameter?
>
StartName
> // Print the configuration information.
>
> printf("\nSample_Srv configuration: \n");
> printf(" Type: 0x%x\n", lpqscBuf->dwServiceType);
> printf(" Start Type: 0x%x\n", lpqscBuf->dwStartType);
> printf(" Error Control: 0x%x\n", lpqscBuf->dwErrorControl);
> printf(" Binary path: %s\n", lpqscBuf->lpBinaryPathName);
>
> if (lpqscBuf->lpLoadOrderGroup != NULL)
> printf(" Load order group: %s\n", lpqscBuf->lpLoadOrderGroup);
> if (lpqscBuf->dwTagId != 0)
> printf(" Tag ID: %d\n", lpqscBuf->dwTagId);
> if (lpqscBuf->lpDependencies != NULL)
> printf(" Dependencies: %s\n", lpqscBuf->lpDependencies);
> if (lpqscBuf->lpServiceStartName != NULL)
> printf(" Start Name: %s\n", lpqscBuf->lpServiceStartName);
> if (lpqscBuf2->lpDescription != NULL)
> printf(" Description: %s\n", lpqscBuf2->lpDescription);
>
> --
> Chris
>
>
> "Joe Richards [MVP]" wrote:
>
> > Check out QueryServiceConfig.
> >
> >
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/queryserviceconfig.asp?frame=true
> >
> > You could also probably use WMI but WMI is such a pain that it generally
isn't
> > worth it, especially in C++.
> >
> > --
> > Joe Richards Microsoft MVP Windows Server Directory Services
> > www.joeware.net
> >
> >
> > Chris wrote:
> > > Hello,
> > >
> > > I'm looking for a C++ code snippet that would help determine the 'log
on as'
> > > account for a Windows service, MSSQLSERVER, for example.
> > >
> > > Any help appreciated!
> > >
> >