Partager via


IVsFileChangeEx.AdviseDirChange Method

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

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

Syntax

'Declaration
Function AdviseDirChange ( _
    pszDir As String, _
    fWatchSubDir As Integer, _
    pFCE As IVsFileChangeEvents, _
    <OutAttribute> ByRef pvsCookie As UInteger _
) As Integer
int AdviseDirChange(
    string pszDir,
    int fWatchSubDir,
    IVsFileChangeEvents pFCE,
    out uint pvsCookie
)
int AdviseDirChange(
    [InAttribute] String^ pszDir, 
    [InAttribute] int fWatchSubDir, 
    [InAttribute] IVsFileChangeEvents^ pFCE, 
    [OutAttribute] unsigned int% pvsCookie
)
abstract AdviseDirChange : 
        pszDir:string * 
        fWatchSubDir:int * 
        pFCE:IVsFileChangeEvents * 
        pvsCookie:uint32 byref -> int
function AdviseDirChange(
    pszDir : String, 
    fWatchSubDir : int, 
    pFCE : IVsFileChangeEvents, 
    pvsCookie : uint
) : int

Parameters

  • pszDir
    Type: String

    [in] String form of the moniker identifier of the directory in the project system.

  • fWatchSubDir
    Type: Int32

    [in] If true, then events should also be fired for changes to sub directories. If false, then events should not be fired for changes to sub directories.

  • pvsCookie
    Type: UInt32%

    [out] Unique identifier for the file that is associated with the event sink.

Return Value

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsFileChangeEx::AdviseDirChange(
   [in] LPCOLESTR pszDir,
   [in] BOOL fWatchSubDir,
   [in] IVsFileChangeEvents *pFCE,
   [out] VSCOOKIE *pvsCookie
);

.NET Framework Security

See Also

Reference

IVsFileChangeEx Interface

Microsoft.VisualStudio.Shell.Interop Namespace