共用方式為


IVsProjectTextImageProvider.OpenItemTextImage Method

Definition

Opens a text image for a given file.

public:
 int OpenItemTextImage(System::String ^ pszMkDocument, System::UInt32 grfMode, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::VsTextImage ^ % ppTextImage);
public:
 int OpenItemTextImage(Platform::String ^ pszMkDocument, unsigned int grfMode, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::VsTextImage ^ &  ppTextImage);
int OpenItemTextImage(std::wstring const & pszMkDocument, unsigned int grfMode, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::VsTextImage const & & ppTextImage);
public int OpenItemTextImage (string pszMkDocument, uint grfMode, out Microsoft.VisualStudio.TextManager.Interop.VsTextImage ppTextImage);
abstract member OpenItemTextImage : string * uint32 * VsTextImage -> int
Public Function OpenItemTextImage (pszMkDocument As String, grfMode As UInteger, ByRef ppTextImage As VsTextImage) As Integer

Parameters

pszMkDocument
String

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

grfMode
UInt32

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

ppTextImage
VsTextImage

[out] Pointer to the created IVsTextImage interface.

Returns

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

Remarks

COM Signature

From vsshell.idl:

[C++]

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

Applies to