IScheduledWorkItem::GetAccountInformation method (mstask.h)
[[This API may be altered or unavailable in subsequent versions of the operating system or product. Please use the Task Scheduler 2.0 Interfaces instead.] ]
Retrieves the account name for the work item.
HRESULT GetAccountInformation( [out] LPWSTR *ppwszAccountName );
A pointer to a null-terminated string that contains the account name for the current work item. The empty string, L"", is returned for the local system account.
After processing the account name, be sure to call CoTaskMemFree to free the string.
The GetAccountInformation method returns one of the following values.
||The operation was successful.|
||The arguments are not valid.|
||Not enough memory is available.|
||The account information has not been set for the work item.|
||Security services are available only on the Windows Server 2003, Windows 2000, and Windows XP operating systems.|
The GetAccountInformation method is for the Windows Server 2003, Windows XP, and Windows 2000 operating systems.
For more information and an example of how to retrieve the account information of a task, see C/C++ Code Example: Retrieving Task Account Information.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|