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.
Syntax
HRESULT GetAccountInformation(
[out] LPWSTR *ppwszAccountName
);
Parameters
[out] 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.
Return value
The GetAccountInformation method returns one of the following values.
Return code | Description |
---|---|
|
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. |
Remarks
The GetAccountInformation method is for the Windows Server 2003, Windows XP, and Windows 2000 operating systems.
Examples
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.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | mstask.h |
Library | Mstask.lib |
DLL | Mstask.dll |