Registers the passed object as the active object for the class specified in cProgID.
Registration causes the object to be listed in the running object table (ROT) of OLE, a globally accessible lookup table that keeps track of objects that are currently running on the computer.

RegisterActiveObject(oObjectReference, cProgID)

Parameters

oObjectReference

A reference to the COM object you want to register in the ROT (running object table).

cProgID

The ProgID of your COM object - the same string you used in CREATEOBJECT.

Return Value

A numeric handle representing the registered object.

Example

Copy code
LOCAL yourObject, nObjectHandle
yourObject = CREATEOBJECT('some.ComObject')
nObjectHandle = RegisterActiveObject(m.yourObject, 'some.ComObject')

&& the object can now be obtained from any program with 
LOCAL loComObjectRef
m.loComObjectRef = GETOBJECT(, 'some.ComObject')

See Also

Reference

CLSIDFromProgID
CLSIDFromString
CreateGuid
CreateThreadObject
GetIUnknown
IsEqualGuid
ProgIDFromCLSID
RegisterObjectAsFileMoniker
RevokeActiveObject
StringFromCLSID

Used WinApi functions

RegisterActiveObject
CLSIDFromProgID