IVsRunningDocTableEvents2.OnAfterSave Method
Called after a document in the Running Document Table (RDT) is saved.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
‘선언
Function OnAfterSave ( _
docCookie As UInteger _
) As Integer
‘사용 방법
Dim instance As IVsRunningDocTableEvents2
Dim docCookie As UInteger
Dim returnValue As Integer
returnValue = instance.OnAfterSave(docCookie)
int OnAfterSave(
uint docCookie
)
int OnAfterSave(
[InAttribute] unsigned int docCookie
)
function OnAfterSave(
docCookie : uint
) : int
docCookie
Type: System.UInt32[in] Abstract value representing the document whose attributes have been changed.
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
IVsRunningDocTableEvents.OnAfterSave(UInt32)
If you want to know if your project or solution is currently closing after you receive an OnAfterSave notification, you need to monitor events on the IVsSolutionEvents3 interface. To do this:
Query the SVsSolution service to get an IVsSolution interface.
Obtain the IVsSolution2 interface from the IVsSolution interface
Next, call the AdviseSolutionEvents to pass in your implementation of the IVsSolutionEvents3.
From vsshell.idl:
HRESULT IVsRunningDocTableEvents2::OnAfterSave(
[in] VSCOOKIE docCookie
);
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
IVsRunningDocTableEvents2 Interface