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
'Declaration
Function AdviseFileChange ( _
pszMkDocument As String, _
grfFilter As UInteger, _
pFCE As IVsFileChangeEvents, _
<OutAttribute> ByRef pvsCookie As UInteger _
) As Integer
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
)
abstract AdviseFileChange :
pszMkDocument:string *
grfFilter:uint32 *
pFCE:IVsFileChangeEvents *
pvsCookie:uint32 byref -> int
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.
grfFilter
Type: System.UInt32[in] Flags that indicate how the file has been changed. For more information, see _VSFILECHANGEFLAGS.
pFCE
Type: Microsoft.VisualStudio.Shell.Interop.IVsFileChangeEvents[in] IVsFileChangeEvents Interface on the object requesting notification of file change events.
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
);
.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.