次の方法で共有


IVsRunningDocTableEvents2.OnAfterAttributeChangeEx Method

Definition

Called after a document attribute changes. This is an advanced version of the OnAfterAttributeChange(UInt32, UInt32) method.

public:
 int OnAfterAttributeChangeEx(System::UInt32 docCookie, System::UInt32 grfAttribs, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHierOld, System::UInt32 itemidOld, System::String ^ pszMkDocumentOld, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHierNew, System::UInt32 itemidNew, System::String ^ pszMkDocumentNew);
public:
 int OnAfterAttributeChangeEx(unsigned int docCookie, unsigned int grfAttribs, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHierOld, unsigned int itemidOld, Platform::String ^ pszMkDocumentOld, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHierNew, unsigned int itemidNew, Platform::String ^ pszMkDocumentNew);
int OnAfterAttributeChangeEx(unsigned int docCookie, unsigned int grfAttribs, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & pHierOld, unsigned int itemidOld, std::wstring const & pszMkDocumentOld, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & pHierNew, unsigned int itemidNew, std::wstring const & pszMkDocumentNew);
public int OnAfterAttributeChangeEx (uint docCookie, uint grfAttribs, Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pHierOld, uint itemidOld, string pszMkDocumentOld, Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pHierNew, uint itemidNew, string pszMkDocumentNew);
abstract member OnAfterAttributeChangeEx : uint32 * uint32 * Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * uint32 * string * Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * uint32 * string -> int
Public Function OnAfterAttributeChangeEx (docCookie As UInteger, grfAttribs As UInteger, pHierOld As IVsHierarchy, itemidOld As UInteger, pszMkDocumentOld As String, pHierNew As IVsHierarchy, itemidNew As UInteger, pszMkDocumentNew As String) As Integer

Parameters

docCookie
UInt32

[in] Abstract value representing the document whose attributes have been changed.

grfAttribs
UInt32

[in] Flags corresponding to the changed attributes. Values are taken from the __VSRDTATTRIB enumeration.

pHierOld
IVsHierarchy

[in] The IVsHierarchy interface that previously owned the document.

itemidOld
UInt32

[in] Indicates the previous item identifier. This is a unique identifier or it can be one of the following values: VSITEMID_NIL, VSITEMID_ROOT, or VSITEMID_SELECTION.

pszMkDocumentOld
String

[in] Name of the old document.

pHierNew
IVsHierarchy

[in] The current IVsHierarchy interface that now owns the document.

itemidNew
UInt32

[in] Indicates the new item identifier. This is a unique identifier or it can be one of the following values: VSITEMID_NIL, VSITEMID_ROOT, or VSITEMID_SELECTION.

pszMkDocumentNew
String

[in] Name of the new document.

Returns

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

Remarks

This version of the OnAfterAttributeChange method includes information about the renaming process, if a rename occurred.

This method is called when a document's attributes have changed. Several things can change a document's attributes:

COM Signature

From vsshell.idl:

HRESULT IVsRunningDocTableEvents2::OnAfterAttributeChangeEx(  
   [in] VSCOOKIE docCookie,  
   [in] VSRDTATTRIB grfAttribs,  
   [in] IVsHierarchy *pHierOld,  
   [in] VSITEMID itemidOld,  
   [in] LPCOLESTR pszMkDocumentOld,  
   [in] IVsHierarchy *pHierNew,  
   [in] VSITEMID itemidNew,  
   [in] LPCOLESTR pszMkDocumentNew  
);  

Applies to