IVsMSBuildTaskFileManager::GetFileContents Method (String^, String^)

 

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)

int GetFileContents(
	String^ wszFilename,
	[OutAttribute] String^% pbstrFileContents
)

Parameters

wszFilename
Type: System::String^

[in] Name of the file to get.

pbstrFileContents
Type: System::String^

[out] The contents of the file.

Return Value

Type: System::Int32

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

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

From vsshell90.idl:

HRESULT GetFileContents(
    [in] LPCOLESTR wszFilename,
    [out, retval] BSTR* pbstrFileContents
);
Return to top
Show: