我只知道VB中的CreateObject(strObjName)
转换为DELPHI是:CreateOleObject(strObjName)
但GetObject(strObjName)函数转换为DELPHI却不知道了。
请高手帮忙。谢谢

解决方案 »

  1.   

    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