Expand Minimize

GetNetScheduleAccountInformation function

The GetNetScheduleAccountInformation function retrieves the AT Service account name.

Syntax


HRESULT GetNetScheduleAccountInformation(
  _In_   LPCWSTR pwszServerName,
  _In_   DWORD ccAccount,
  _Out_  WCHAR wszAccount[]
);

Parameters

pwszServerName [in]

A NULL-terminated wide character string for the name of the computer whose account information is being retrieved.

ccAccount [in]

The number of characters, including the NULL terminator, allocated for wszAccount. The maximum allowed length for this value is the maximum domain name length plus the maximum user name length plus 2, expressed as DNLEN + UNLEN + 2. (The last two characters are the "\" character and the NULL terminator.)

wszAccount [out]

An array of wide characters, including the NULL terminator, that receives the account information.

Return value

The return value is an HRESULT. A value of S_OK indicates the function succeeded, and the account information is returned in wszAccount. A value of S_FALSE indicates the function succeeded, and the account is the Local System account (no information will be returned in wszAccount). Any other return values indicate an error condition.

Remarks

To successfully call the GetNetScheduleAccountInformation function, the caller should have read access to the task folder which is usually %windir%\tasks or as defined in the following registry setting:

HKLM\SOFTWARE\Microsoft\SchedulingAgent\TasksFolder\

Requirements

Minimum supported client

Windows Vista, Windows XP with SP1 [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

AtAcct.h

Library

Mstask.lib

DLL

Mstask.dll

See also

SetNetScheduleAccountInformation

 

 

Community Additions

ADD
Show:
© 2015 Microsoft