Contents Index Topic Contents | ||
Previous Topic: ITask Next Topic: ITask::GetMaxRunTime |
ITask::GetApplicationName
HRESULT GetApplicationName( LPWSTR * ppwszApplicationName );Retrieves the name of the application that the task is associated with.
- Returns one of the following values:
S_OK The operation was successful. E_INVALIDARG The arguments are not valid. E_OUTOFMEMORY Not enough memory is available.
- ppwszApplicationName
- Address of an LPWSTR that contains the name of the application the current task is associated with. The method that invokes GetApplicationName is responsible for freeing this string using the CoTaskMemFree function.
If you set the application name property to an executable file, you can set the parameters property to the command-line arguments to pass to that executablefor example, ApplicationName=notepad.exe and Parameters=foo.txt.
However, if you set the ApplicationName property to a non-executable file, the parameters property will be ignored, because the application name in this case is the parameterfor example, ApplicationName=foo.txt.
See also ITask::SetApplicationName
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.