Carapace

COM Functions

function name description
progId return the progId for the supplied Dispatch object
interfaceName return the name for the current inteface of the supplied object
invoke invoke the specified dispatch method or property
method invoke the specified method
getProperty get the specified dispatch property
putProperty set the specified property
putPropertyRef set the specified dispatch property reference
dllServer register or un-register the supplied DLL COM server
comLink link up matching event source/sink interfaces on the COM client and server
comUnlink break the link between matching event source/sink interfaces on the COM client and server


progId

Return the progId for the supplied Dispatch object.

Arguments:

dispatchDispatch

Return type: String


interfaceName

Return the name for the current inteface of the supplied object. If the object is a Dispatch object, then the progId is returned.

Arguments:

objObject

Return type: Object


invoke

Invoke the specified dispatch method or property. Carapace tries hard to guess the correct invocation flags for the dispatch invocation. This function exists to allow a manual override -- in case Carapace cannot determine the correct values.

The first argument flags is a bitwise combination of the following flags:

DISPATCH_METHOD 1
DISPATCH_PROPERTYGET 2
DISPATCH_PROPERTYPUT 4
DISPATCH_PROPERTYPUTREF8

Arguments:

flagsInteger
dispDispatch
methodOrPropertyNameString
...remaining arguments

Return type: Object


method

Invoke the specified method.

Arguments:

objObject
methodNameString
...remaining arguments

Return type: Object


getProperty

Get the specified property. This can be given arguments when getting a property from a collection.

Arguments:

objObject
propertyNameString
...remaining arguments

Return type: Object


putProperty

Set the specified property.

Arguments:

objObject
propertyNameString
...remaining arguments

Return type: Object


putPropertyRef

Set the specified dispatch property reference.

Arguments:

dispDispatch
propertyNameString
...remaining arguments

Return type: Object


dllServer

Register or un-register the supplied DLL COM server. The allowed command is register or unregister.

Arguments:

dllNameString
commanString

Return type: Object


comLink

Link up matching event source/sink interfaces on the supplied COM objects. This allows events fired by the COM source to be received by the sink.

The value returned is the cookie used to identify the connection -- this is passed into comUnlink when the events connection is to be broken.

Arguments:

sourceObject
sinkObject

Return type: Integer


comUnlink

Break the link between matching event source/sink interfaces on the COM client and server. This stops events fired by the COM server from being received by the client.

The cookie is the value returned by the comLink function when the events connection was made.

Arguments:

sourceObject
sinkObject
cookieInteger

Return type: Object


Contents Index Current topic: COM Related topics: objects, functions