IVsRunningDocTableEvents2::OnAfterAttributeChangeEx Method (UInt32, UInt32, IVsHierarchy^, UInt32, String^, IVsHierarchy^, UInt32, String^)
Called after a document attribute changes. This is an advanced version of the OnAfterAttributeChange method.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
int OnAfterAttributeChangeEx( unsigned int docCookie, unsigned int grfAttribs, IVsHierarchy^ pHierOld, unsigned int itemidOld, String^ pszMkDocumentOld, IVsHierarchy^ pHierNew, unsigned int itemidNew, String^ pszMkDocumentNew )
Parameters
- docCookie
-
Type:
System::UInt32
[in] Abstract value representing the document whose attributes have been changed.
- grfAttribs
-
Type:
System::UInt32
[in] Flags corresponding to the changed attributes. Values are taken from the __VSRDTATTRIB enumeration.
- pHierOld
-
Type:
Microsoft.VisualStudio.Shell.Interop::IVsHierarchy^
[in] The IVsHierarchy interface that previously owned the document.
- itemidOld
-
Type:
System::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
-
Type:
System::String^
[in] Name of the old document.
- pHierNew
-
Type:
Microsoft.VisualStudio.Shell.Interop::IVsHierarchy^
[in] The current IVsHierarchy interface that now owns the document.
- itemidNew
-
Type:
System::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
-
Type:
System::String^
[in] Name of the new document.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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:
Calling the NotifyDocumentChanged method in the IVsRunningDocumentTable interface.
Calling the RegisterAndLockDocument and RenameDocument methods.
Changing the caption on the document's window.
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 );