IVsFileChangeEx::AdviseFileChange Method (String^, UInt32, IVsFileChangeEvents^, UInt32)

 

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)

int AdviseFileChange(
	String^ pszMkDocument,
	unsigned int grfFilter,
	IVsFileChangeEvents^ pFCE,
	[OutAttribute] unsigned int% pvsCookie
)

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.

From vsshell.idl:

From vsshell.idl:

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