OnGlobalSymbolRenamed Method
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

IVsHierarchyRefactorNotify.OnGlobalSymbolRenamed Method

Called after a symbol is renamed.

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in

int OnGlobalSymbolRenamed (
	[InAttribute] uint cItemsAffected,
	[InAttribute] uint[] rgItemsAffected,
	[InAttribute] uint cRQNames,
	[InAttribute] string[] rglpszRQName,
	[InAttribute] string lpszNewName
int OnGlobalSymbolRenamed (
	/** @attribute InAttribute() */ UInt32 cItemsAffected, 
	/** @attribute InAttribute() */ UInt32[] rgItemsAffected, 
	/** @attribute InAttribute() */ UInt32 cRQNames, 
	/** @attribute InAttribute() */ String[] rglpszRQName, 
	/** @attribute InAttribute() */ String lpszNewName
function OnGlobalSymbolRenamed (
	cItemsAffected : uint, 
	rgItemsAffected : uint[], 
	cRQNames : uint, 
	rglpszRQName : String[], 
	lpszNewName : String
) : int



The number of files affected by the rename.


An array of VSITEMIDs that identifies the affected files.


The number of the renamed symbols. The number can be greater than one if an overloaded symbol is renamed.


The name of the symbol before rename.


The name of the symbol after the rename.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

To stop the rename operation, the HRESULT must contain one of the following error codes:





A symbol with the same name may have more than one occurrence, if the language allows overloading operations, such as method overloading:

void SomeMethod() {}
void SomeMethod(int i) {}

COM Signature

From vsshell80.idl:

HRESULT OnGlobalSymbolRenamed(
    [in] ULONG cItemsAffected,                               
    [in, size_is(cItemsAffected)] VSITEMID rgItemsAffected[],
    [in] ULONG cRQNames,                                     
    [in, size_is(cRQNames)] LPCOLESTR rglpszRQName[],        
    [in] LPCOLESTR lpszNewName);                             
© 2016 Microsoft