IVsObjectList2::CanRename Method (UInt32, String^, Int32)
Returns a flag indicating if the given list item can be renamed.
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Parameters
- index
-
Type:
System::UInt32
[in] Specifies the index of the list item of interest.
- pszNewName
-
Type:
System::String^
[in] Pointer to a null-terminated string containing the new name.
- pfOK
-
Type:
System::Int32
[out] Pointer to a flag indicating whether an item can be renamed.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
From vsshell80.idl:
[C++]
HRESULT IVsObjectList2::CanRename( [in] ULONG Index, [in] LPCOLESTR pszNewName, [out] BOOL *pfOK );
Return pfOK to indicate whether the item Index can be renamed. If the passed in pszNewName is null, you simply answer the general question of whether or not that item supports rename (return true or false). If pszNewName is non-null, do validation of the new name and return true if successful rename with that new name is possible or an error in hr (along with false) if the name is somehow invalid and set the rich error info to indicate to the user what was wrong.