다음을 통해 공유


IVsMSBuildTaskFileManager.GetFileContents Method

Gets the contents of a specified file.

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

Syntax

'Declaration
Function GetFileContents ( _
    wszFilename As String, _
    <OutAttribute> ByRef pbstrFileContents As String _
) As Integer
int GetFileContents(
    string wszFilename,
    out string pbstrFileContents
)
int GetFileContents(
    [InAttribute] String^ wszFilename, 
    [OutAttribute] String^% pbstrFileContents
)
abstract GetFileContents : 
        wszFilename:string * 
        pbstrFileContents:string byref -> int
function GetFileContents(
    wszFilename : String, 
    pbstrFileContents : String
) : int

Parameters

  • wszFilename
    Type: String

    [in] Name of the file to get.

  • pbstrFileContents
    Type: String%

    [out] The contents of the file.

Return Value

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

Remarks

This method returns the contents of the specified file based on what is in memory or what is on disk if not in-memory.

COM Signature

From vsshell90.idl:

HRESULT GetFileContents(
    [in] LPCOLESTR wszFilename,
    [out, retval] BSTR* pbstrFileContents
);

.NET Framework Security

See Also

Reference

IVsMSBuildTaskFileManager Interface

Microsoft.VisualStudio.Shell.Interop Namespace