comclient_garbage_collectcomclient_garbage_collect/0 performs an atom garbage
collection, i.e. garbage_collect_atoms/0, so it should be used
sparingly.
comclient_is_object(+Object)comclient_valid_object/1. Currently an object looks like
'$comclient_object'(stuff) where stuff is some prolog
term. Do not rely on this representation!
comclient_valid_object(+Object)comclient_equal(+Object1, +Object2)'IUnknown' interfaces are identical)
comclient_clsid_from_progid(+ProgID, -CLSID).CLSIDFromProgID. You rarely need this since
you can use the ProgID directly in most cases.
comclient_progid_from_clsid(+CLSID, -ProgID).ProgIDFromCLSID. Rarely needed. The ProgID
returned will typically have the version suffix appended.
Example, to determine what version of Excel.Application is installed:
| ?- comclient_clsid_from_progid('Excel.Application, CLSID),
comclient_progid_from_clsid(CLSID, ProgID).
CLSID = '{00024500-0000-0000-C000-000000000046}',
ProgID = 'Excel.Application.8'
comclient_iid_from_name(+IName, -IID) | ?- comclient_iid_from_name('IDispatch', IID).
IID = '{00020400-0000-0000-C000-000000000046}'
comclient_name_from_iid(+IID, -IName)comclient_create_instance(+ID, -Object) comclient_create_instance('Excel.Application', App)
Corresponds to CoCreateInstance.
comclient_get_active_object(+ID, -Object) comclient_get_active_object('Excel.Application', App)
An exception is thrown if there is no suitable running object.
Corresponds to GetActiveObject.
comclient_invoke_method_fun(+Object, +CallSpec, -ComValue)comclient_invoke_method_proc(+Object, +CallSpec)comclient_invoke_put(+Object, +CallSpec, +ComInArg)comclient_invoke_put(App, visible, 1)
comclient_release(+Object)Please note: The same COM-object can be represented by different prolog terms. A COM object is not released from SICStus Prolog until all such representations have been released, either explicitly by callingcomclient_release/1or by callingcomclient_garbage_collect/0.You cannot use Obj1
==Obj2 to determine whether two COM-objects are identical. Instead usecomclient_equal/2.
comclient_is_exception(+ExceptionTerm) catch(<some code>,
Exception,
( comclient_is_exception(E) ->
handle_com_related_errors(E)
; otherwise -> % Pass other exceptions upwards
throw(E)
))
comclient_exception_code(+ExceptionTerm, -ErrorCode)comclient_exception_culprit(+ExceptionTerm, -Culprit)comclient_exception_description(+ExceptionTerm, -Description)HRESULT causing the exception. Culprit is a
term corresponding to the call that gave an
exception. Description, if available, is either a term
'EXCEPINFO'(...) corresponding to an EXCEPINFO
structure or 'ARGERR'(MethodName, ArgNumber).
The EXCEPINFO has six arguments corresponding to, and in the
same order as, the arguments of the EXCEPINFO struct.