IVsHierarchyRefactorNotify.OnGlobalSymbolRenamed 方法

定义

重命名符号后调用。

public:
 int OnGlobalSymbolRenamed(System::UInt32 cItemsAffected, cli::array <System::UInt32> ^ rgItemsAffected, System::UInt32 cRQNames, cli::array <System::String ^> ^ rglpszRQName, System::String ^ lpszNewName);
public:
 int OnGlobalSymbolRenamed(unsigned int cItemsAffected, Platform::Array <unsigned int> ^ rgItemsAffected, unsigned int cRQNames, Platform::Array <Platform::String ^> ^ rglpszRQName, Platform::String ^ lpszNewName);
int OnGlobalSymbolRenamed(unsigned int cItemsAffected, std::Array <unsigned int> const & rgItemsAffected, unsigned int cRQNames, std::Array <std::wstring const &> const & rglpszRQName, std::wstring const & lpszNewName);
public int OnGlobalSymbolRenamed (uint cItemsAffected, uint[] rgItemsAffected, uint cRQNames, string[] rglpszRQName, string lpszNewName);
abstract member OnGlobalSymbolRenamed : uint32 * uint32[] * uint32 * string[] * string -> int
Public Function OnGlobalSymbolRenamed (cItemsAffected As UInteger, rgItemsAffected As UInteger(), cRQNames As UInteger, rglpszRQName As String(), lpszNewName As String) As Integer

参数

cItemsAffected
UInt32

受重命名影响的文件数。

rgItemsAffected
UInt32[]

标识受影响的文件的 VSITEMIDs 的数组。

cRQNames
UInt32

已重命名的符号的数量。 如果重命名了重载符号,则该数字可以大于1。

rglpszRQName
String[]

重命名前符号的名称。

lpszNewName
String

重命名后的符号的名称。

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

注解

若要停止重命名操作,HRESULT 必须包含以下错误代码之一:

E_ABORT

OLE_E_PROMPTSAVECANCELLED

OLECMDERR_E_CANCELED

HR_E_CSHARP_USER_CANCEL

如果该语言允许重载操作(如方法重载),则同名符号可能具有多个匹配项:

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

COM 签名

从 vsshell80:

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

适用于