次の方法で共有


IVsTextStream.InitializeContent Method (String, Int32)

Initializes the content of the text buffer.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

Syntax

'宣言
Function InitializeContent ( _
    pszText As String, _
    iLength As Integer _
) As Integer
'使用
Dim instance As IVsTextStream
Dim pszText As String
Dim iLength As Integer
Dim returnValue As Integer

returnValue = instance.InitializeContent(pszText, _
    iLength)
int InitializeContent(
    string pszText,
    int iLength
)
int InitializeContent(
    [InAttribute] String^ pszText, 
    [InAttribute] int iLength
)
abstract InitializeContent : 
        pszText:string * 
        iLength:int -> int 
function InitializeContent(
    pszText : String, 
    iLength : int
) : int

Parameters

  • pszText
    Type: System.String
    [in] Text to insert into the buffer.
  • iLength
    Type: System.Int32
    [in] Number of characters to be inserted.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Implements

IVsTextBuffer.InitializeContent(String, Int32)

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsTextStream::InitializeContent(
   [in] const WCHAR *pszText,
   [in] long iLength
);

This method will fail unless called on a new untitled buffer.

.NET Framework Security

See Also

Reference

IVsTextStream Interface

IVsTextStream Members

InitializeContent Overload

Microsoft.VisualStudio.TextManager.Interop Namespace