Partager via


IVsSimpleDocFactory.LoadDocument Method

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

'Declaration
Function LoadDocument ( _
    pszMkDocument As String, _
    ByRef riid As Guid, _
    <OutAttribute> ByRef ppDocData As IntPtr _
) As Integer
int LoadDocument(
    string pszMkDocument,
    ref Guid riid,
    out IntPtr ppDocData
)
int LoadDocument(
    [InAttribute] String^ pszMkDocument, 
    [InAttribute] Guid% riid, 
    [OutAttribute] IntPtr% ppDocData
)
abstract LoadDocument : 
        pszMkDocument:string * 
        riid:Guid byref * 
        ppDocData:IntPtr byref -> int
function LoadDocument(
    pszMkDocument : String, 
    riid : Guid, 
    ppDocData : IntPtr
) : int

Parameters

  • pszMkDocument
    Type: String

    [in] Pointer to a string containing the path and file name.

  • riid
    Type: Guid%

    [in] Pointer to a GUID that is the REFIID of the interface desired.

  • ppDocData
    Type: IntPtr%

    [out] Pointer to the desired interface on the object implementing IVsPersistDocData.

Return Value

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

.NET Framework Security

See Also

Reference

IVsSimpleDocFactory Interface

Microsoft.VisualStudio.Shell.Interop Namespace