Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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. 
- pFCE 
 Type: Microsoft.VisualStudio.Shell.Interop.IVsFileChangeEvents- [in] IVsFileChangeEvents Interface on the object requesting notification of file change events. 
- 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
- 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.