Partager via


IVsMSBuildTaskFileManager.GetFileContents(String, String) Method

Definition

Gets the contents of a specified file.

public:
 int GetFileContents(System::String ^ wszFilename, [Runtime::InteropServices::Out] System::String ^ % pbstrFileContents);
int GetFileContents(std::wstring const & wszFilename, [Runtime::InteropServices::Out] std::wstring const & & pbstrFileContents);
public int GetFileContents (string wszFilename, out string pbstrFileContents);
abstract member GetFileContents : string * string -> int
Public Function GetFileContents (wszFilename As String, ByRef pbstrFileContents As String) As Integer

Parameters

wszFilename
String

[in] Name of the file to get.

pbstrFileContents
String

[out] The contents of the file.

Returns

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  
);  

Applies to