Partager via


IScriptEntry::SetItemName

Sets the item name that identifies an IScriptEntry object.

Syntax

HRESULT SetItemName(  
   LPCOLESTR          psz  
);  

Parameters

psz
[in] The address of a buffer that contains the item name. The item name is used by the host to identify the entry.

Return Value

An HRESULT. Possible values include, but are not limited to, those in the following table.

Value Description
S_OK The method succeeded.
E_FAIL The method did not succeed.

Remarks

For IScriptEntry objects, this method returns S_OK.

For IScriptScriptlet objects (which derive from IScriptEntry), this method returns E_FAIL. For IScriptScriptlet objects, the item name is set by IActiveScriptAuthor::AddScriptlet and cannot be changed.

See also

IScriptEntry Interface
IScriptEntry::GetItemName