다음을 통해 공유


IVsFileChangeEx.AdviseFileChange Method

Enables a client to receive notifications of changes to a file.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

‘선언
Function AdviseFileChange ( _
    pszMkDocument As String, _
    grfFilter As UInteger, _
    pFCE As IVsFileChangeEvents, _
    <OutAttribute> ByRef pvsCookie As UInteger _
) As Integer
‘사용 방법
Dim instance As IVsFileChangeEx
Dim pszMkDocument As String
Dim grfFilter As UInteger
Dim pFCE As IVsFileChangeEvents
Dim pvsCookie As UInteger
Dim returnValue As Integer

returnValue = instance.AdviseFileChange(pszMkDocument, _
    grfFilter, pFCE, pvsCookie)
int AdviseFileChange(
    string pszMkDocument,
    uint grfFilter,
    IVsFileChangeEvents pFCE,
    out uint pvsCookie
)
int AdviseFileChange(
    [InAttribute] String^ pszMkDocument, 
    [InAttribute] unsigned int grfFilter, 
    [InAttribute] IVsFileChangeEvents^ pFCE, 
    [OutAttribute] unsigned int% pvsCookie
)
function AdviseFileChange(
    pszMkDocument : String, 
    grfFilter : uint, 
    pFCE : IVsFileChangeEvents, 
    pvsCookie : uint
) : int

Parameters

  • pszMkDocument
    Type: System.String

    [in] String form of the moniker identifier of the document in the project system. In the case of documents that are files, this is always the path to the file. This parameter can also be used to specify documents that are not files.

  • pvsCookie
    Type: System.UInt32%

    [out] Unique identifier for the file with which the event sink is associated. This value is used to unadvise the event sink using UnadviseFileChange Method.

Return Value

Type: System.Int32

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

Remarks

COM Signature

From vsshell.idl:

From vsshell.idl:

HRESULT IVsFileChangeEx::AdviseFileChange(
   [in] LPCOLESTR pszMkDocument,
   [in] VSFILECHANGEFLAGS grfFilter,
   [in] IVsFileChangeEvents *pFCE,
   [out] VSCOOKIE *pvsCookie
);

Permissions

See Also

Reference

IVsFileChangeEx Interface

IVsFileChangeEx Members

Microsoft.VisualStudio.Shell.Interop Namespace