GetNetScheduleAccountInformation function (Windows)

Switch View :
ScriptFree
GetNetScheduleAccountInformation function

Applies to: desktop apps only

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

Minimum supported server

Windows Server 2003

Header

AtAcct.h

Library

Mstask.lib

DLL

Mstask.dll

See also

SetNetScheduleAccountInformation

 

 

Send comments about this topic to Microsoft

Build date: 2/3/2012