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
'Déclaration
Function AdviseFileChange ( _
pszMkDocument As String, _
grfFilter As UInteger, _
pFCE As IVsFileChangeEvents, _
<OutAttribute> ByRef pvsCookie As UInteger _
) As Integer
'Utilisation
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.
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
);
Permissions
- 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.