Loads the given file into a document data object and returns the given interface on that object.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'宣言
Function LoadDocument ( _
pszMkDocument As String, _
ByRef riid As Guid, _
<OutAttribute> ByRef ppDocData As IntPtr _
) As Integer
'使用
Dim instance As IVsSimpleDocFactory
Dim pszMkDocument As String
Dim riid As Guid
Dim ppDocData As IntPtr
Dim returnValue As Integer
returnValue = instance.LoadDocument(pszMkDocument, _
riid, ppDocData)
int LoadDocument(
string pszMkDocument,
ref Guid riid,
out IntPtr ppDocData
)
int LoadDocument(
[InAttribute] String^ pszMkDocument,
[InAttribute] Guid% riid,
[OutAttribute] IntPtr% ppDocData
)
function LoadDocument(
pszMkDocument : String,
riid : Guid,
ppDocData : IntPtr
) : int
Parameters
pszMkDocument
Type: System.String[in] Pointer to a string containing the path and file name.
riid
Type: System.Guid%[in] Pointer to a GUID that is the REFIID of the interface desired.
ppDocData
Type: System.IntPtr%[out] Pointer to the desired interface on the object implementing IVsPersistDocData.
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:
HRESULT IVsSimpleDocFactory::LoadDocument(
[in] LPCOLESTR pszMkDocument,
[in] REFIID riid,
[out, iid_is(riid)] void **ppDocData
);
Permissions
- 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.