views:

64

answers:

1

Hello!

I have a Windows service which starts another application using CreateProcess. Thus, the application runs with SYSTEM privileges. This application calls LsaEnumerateLogonSessions, which returns the error code 8 (Not enough storage is available to process this command.). The service and the application are run under Windows 7 x64.

ULONG luLogonSessionCount = 0;
LUID *pLogonSessionList = NULL;
NTSTATUS lNtStatus = LsaEnumerateLogonSessions(
        &luLogonSessionCount, &pLogonSessionList );

LsaNtStatusToWinError( lNtStatus ) returns 8. Does anyone know the cause of this?

Thanks in advance!

A: 

Most services nowadays run under a service account, for security reasons. Check that your service has adequate permissions. What is the actual NTSTATUS result?

Conal