共用方式為


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

'宣告
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
)
abstract LoadDocument : 
        pszMkDocument:string * 
        riid:Guid byref * 
        ppDocData:IntPtr byref -> int 
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.

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

.NET Framework Security

See Also

Reference

IVsSimpleDocFactory Interface

IVsSimpleDocFactory Members

Microsoft.VisualStudio.Shell.Interop Namespace