MSDN 抄的:CreateObject (ProgID) --------------------- CLSIDFromProgID CoCreateInstance QueryInterface to get IDispatch interface. GetObject (filename, ProgID) ----------------------------- CLSIDFromProgID CoCreateInstance QueryInterface for IPersistFile interface. Load on IPersistFile interface. QueryInterface to get IDispatch interface. GetObject (filename) ------------------- CreateBindCtx creates the bind context for the subsequent functions. MkParseDisplayName returns a moniker handle for BindMoniker. BindMoniker returns a pointer to the IDispatch interface. Release on moniker handle. Release on context. GetObject (ProgID) ----------------- CLSIDFromProgID GetActiveObject on class ID. QueryInterface to get IDispatch interface. Dim x As New interface ----------------------- Find CLSID for interface. CoCreateInstance QueryInterface
---------------------
CLSIDFromProgID
CoCreateInstance
QueryInterface to get IDispatch interface.
GetObject (filename, ProgID)
-----------------------------
CLSIDFromProgID
CoCreateInstance
QueryInterface for IPersistFile interface.
Load on IPersistFile interface.
QueryInterface to get IDispatch interface.
GetObject (filename)
-------------------
CreateBindCtx creates the bind context for the subsequent functions.
MkParseDisplayName returns a moniker handle for BindMoniker.
BindMoniker returns a pointer to the IDispatch interface.
Release on moniker handle.
Release on context.
GetObject (ProgID)
-----------------
CLSIDFromProgID
GetActiveObject on class ID.
QueryInterface to get IDispatch interface.
Dim x As New interface
-----------------------
Find CLSID for interface.
CoCreateInstance
QueryInterface