Home COM GDI+ WebBrowser Data Access

IRunnableObject Interface

 

IID_IRunnableObject

{00000126-0000-0000-C000-000000000046}

 

 

The IRunnableObject interface enables a container to control the running of its embedded objects. In the case of an object implemented with a local server, calling IRunnableObject::Run launches the server's .EXE file. In the case of an object implemented with an in-process server, calling the Run method causes the object .DLL file to transition into the running state.

 

Object handlers should implement IRunnableObject to provide their containers with a way to run them and manage their running state. DLL object applications should implement IRunnableObject to support silent updates of their objects.

 

Containers call IRunnableObject to determine if an embedded object is running, to force an object to run, to lock an object into the running state, or to inform an object handler whether its object is being run as either a simple embedding or as a link source.

 

 

Methods in VTable order

IUnknown Methods

Description

QueryInterface

Returns pointers to supported interfaces.

AddRef

Increments reference count.

Release

Decrements reference count.

IRunnableObject Methods

Description

GetRunningClass

Returns CLSID of a running object.

Run

Forces an object to run.

IsRunning

Determines if an object is running.

LockRunning

Locks an object into running state.

SetContainedObject

Indicates that an object is embedded.

 

GetRunningclass

 

FUNCTION IRunnableObject_GetRunningClass ( _

  BYVAL pthis AS DWORD PTR _

, BYREF lpClsid AS GUID _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[3] USING IRunnableObject_GetRunningClass (pthis, lpClsid) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

 

FUNCTION IRunnableObject_GetRunningClass ( _

  BYVAL pthis AS DWORD PTR _

, BYREF lpClsid AS GUID _

  ) AS LONG
 

  ! mov  eax, lpClsid

  ! push eax

  ! mov  eax, pthis
  ! push eax
  ! mov  eax, dword ptr[eax]
  ! call dword ptr[eax+12]
  ! mov  FUNCTION, eax


END FUNCTION

 

 

Run

 

FUNCTION IRunnableObject_Run ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL pbc AS DWORD _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[4] USING IRunnableObject_Run (pthis, pbc) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

 

FUNCTION IRunnableObject_Run ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL pbc AS DWORD _

  ) AS LONG
 

  ! push pbc
  ! mov  eax, pthis
  ! push eax
  ! mov  eax, dword ptr[eax]
  ! call dword ptr[eax+16]
  ! mov  FUNCTION, eax


END FUNCTION

 

 

IsRunning

 

FUNCTION IRunnableObject_IsRunning ( _

  BYVAL pthis AS DWORD PTR _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[5] USING IRunnableObject_IsRunning (pthis) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

 

FUNCTION IRunnableObject_IsRunning ( _

  BYVAL pthis AS DWORD PTR _

  ) AS LONG
 

  ! mov  eax, pthis
  ! push eax
  ! mov  eax, dword ptr[eax]
  ! call dword ptr[eax+20]
  ! mov  FUNCTION, eax


END FUNCTION

 

 

LockRunning

 

FUNCTION IRunnableObject_LockRunning ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL fLock AS LONG _

, BYVAL fLastUnlockCloses AS LONG _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[6] USING IRunnableObject_LockRunning (pthis, fLock, fLastUnlockCloses) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

 

FUNCTION IRunnableObject_LockRunning ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL fLock AS LONG _

, BYVAL fLastUnlockCloses AS LONG _

  ) AS LONG
 

  ! push fLastUnlockCloses

  ! push fLock
  ! mov  eax, pthis
  ! push eax
  ! mov  eax, dword ptr[eax]
  ! call dword ptr[eax+24]
  ! mov  FUNCTION, eax


END FUNCTION

 

 

SetContainedObject

 

FUNCTION IRunnableObject_SetContainedObject ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL fContained AS LONG _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[7] USING IRunnableObject_SetContainedObject (pthis, fContained) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

 

FUNCTION IRunnableObject_SetContainedObject ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL fContained AS LONG _

  ) AS LONG
 

  ! push fContained
  ! mov  eax, pthis
  ! push eax
  ! mov  eax, dword ptr[eax]
  ! call dword ptr[eax+28]
  ! mov  FUNCTION, eax


END FUNCTION

 

 

Page last updated on Monday, 03 April 2006 20:21:38 +0200