This documentation is archived and is not being maintained.

IVsProjectTextImageProvider.OpenItemTextImage Method

Opens a text image for a given file.

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

int OpenItemTextImage (
	[InAttribute] string pszMkDocument,
	[InAttribute] uint grfMode,
	out VsTextImage ppTextImage
int OpenItemTextImage (
	/** @attribute InAttribute() */ String pszMkDocument, 
	/** @attribute InAttribute() */ UInt32 grfMode, 
	/** @attribute OutAttribute() */ /** @ref */ VsTextImage ppTextImage
JScript does not support passing value-type arguments by reference.



[in] Pointer to a string containing the file name and path.


[in] Integer. The mode in which to open the image—read only or read/write. A value from the __VSPTIP_MODE enumeration.


[out] Pointer to the created IVsTextImage interface.

Return Value

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

COM Signature

From vsshell.idl:


HRESULT IVsProjectTextImageProvider::OpenItemTextImage(
   [in] LPCOLESTR pszMkDocument, 
   [in] VSPTIP_MODE grfMode