共用方式為


IVsPropertyStreamOut.WriteSzAsBSTR Method

Write out a null-terminated string property value as a BSTR.

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

Syntax

'宣告
Function WriteSzAsBSTR ( _
    szPropertyName As String, _
    szValue As String, _
    szLineComment As String _
) As Integer
'用途
Dim instance As IVsPropertyStreamOut
Dim szPropertyName As String
Dim szValue As String
Dim szLineComment As String
Dim returnValue As Integer

returnValue = instance.WriteSzAsBSTR(szPropertyName, _
    szValue, szLineComment)
int WriteSzAsBSTR(
    string szPropertyName,
    string szValue,
    string szLineComment
)
int WriteSzAsBSTR(
    [InAttribute] String^ szPropertyName, 
    [InAttribute] String^ szValue, 
    [InAttribute] String^ szLineComment
)
abstract WriteSzAsBSTR : 
        szPropertyName:string * 
        szValue:string * 
        szLineComment:string -> int 
function WriteSzAsBSTR(
    szPropertyName : String, 
    szValue : String, 
    szLineComment : String
) : int

Parameters

  • szPropertyName
    Type: System.String
    [in] String containing the property name.
  • szValue
    Type: System.String
    [in] String containing the property's value.
  • szLineComment
    Type: System.String
    [in] An optional string containing a comment.

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:

[C++]

HRESULT IVsPropertyStreamOut::WriteSzAsBSTR(
   [in] LPCOLESTR szPropertyName, 
   [in] LPCOLESTR szValue, 
   [in, optional] LPCOLESTR szLineComment
);

.NET Framework Security

See Also

Reference

IVsPropertyStreamOut Interface

IVsPropertyStreamOut Members

Microsoft.VisualStudio.Shell.Interop Namespace