ITask::GetApplicationNameITask::GetApplicationName*
*



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.

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 executable—for 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 parameter—for example, ApplicationName=foo.txt.

See also ITask::SetApplicationName

Back to top


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.