ComObjDll()

Auto Hotkey

ComObjDll

Creates a COM object from a dll.

OutputVar := ComObjDll(hModule, CLSID , IID)
Function Example: ahk := ComObjDll(hModule,"{C00BCC8C-5A04-4392-870F-20AAE1B926B2}")

Parameters

OutputVar

The name of the variable in which to store the result. The result is different when IID parameter is used:

  • If IID is not specified a wrapper object supporting object syntax is returned.
  • When IID is specified, interface pointer is returned. The script must typically call ObjRelease when it is finished with the pointer.

  • If an error occurs, an empty string is returned.

    hModule

    Dll Module handle, loaded via LoadLibrary or MemoryLoadLibrary.

    CLSID

    CLSID or human-readable Prog ID of the COM object to create.

    IID

    The identifier of an interface the object supports.

    Related

    ComObjCreate, ComObjGet, ComObjActive, ComObjConnect, ComObjArray, ComObjError, ComObjQuery, CreateObject (MSDN)

    Examples

    For a constantly growing list of examples, see the following forum topic: http://www.autohotkey.com/forum/topic61509.html.

    ie := ComObjCreate("InternetExplorer.Application")
    ie.Visible := true  ; This is known to work incorrectly on IE7.
    ie.Navigate("http://l.autohotkey.net/")