RunningDocumentTable::RenameDocument Method (String^, String^, IVsHierarchy^, UInt32)

 

Renames a document and optionally gives ownership of the document to the specified project.

Namespace:   Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)

public:
void RenameDocument(
	String^ oldName,
	String^ newName,
	IVsHierarchy^ pIVsHierarchy,
	unsigned int itemId
)

Parameters

oldName
Type: System::String^

[in] The full path representing the original name.

newName
Type: System::String^

[in] The full path representing the new name.

pIVsHierarchy
Type: Microsoft.VisualStudio.Shell.Interop::IVsHierarchy^

[in] An IVsHierarchy object representing the project that is to take ownership of the document. Pass the value (IVsHierarchy)-1 to indicate no change in ownership is to take place

itemId
Type: System::UInt32

[in] This value can be VSITEMID_NIL, VSITEMID_ROOT, or VSITEMID_SELECTION. Pass VSITEMID_NIL to indicate no change in ownership is to take place.

This method renames the document. In addition, the owner of the document can be set or changed by specifying the IVsHierarchy object representing the project that is to take ownership.

Return to top
Show: