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
'Declaración
Function GetFileContents ( _
wszFilename As String, _
<OutAttribute> ByRef pbstrFileContents As String _
) As Integer
'Uso
Dim instance As IVsMSBuildTaskFileManager
Dim wszFilename As String
Dim pbstrFileContents As String
Dim returnValue As Integer
returnValue = instance.GetFileContents(wszFilename, _
pbstrFileContents)
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: 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.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
IVsMSBuildTaskFileManager Interface