




 
A variable which is bound to interface-ptr while the forms are evaluated.
A form which is evaluated to yield a COM interface pointer.
A form to be evaluated.
When the macro with-temp-interface evaluates the forms, the variable var is bound to the value of interface-ptr. When control leaves the body (whether directly or due to a non-local exit), release is called with this interface pointer.
This example invokes the COM method GetDocumentation in the interface ITypeInfo on an interface pointer which must be released after use.
(defun get-tinfo-member-documentation (disp tinfo
member-id)
(with-temp-interface (typeinfo)
(get-type-info disp tinfo)
(call-com-interface (typeinfo i-type-info
get-documentation)
member-id)))
LispWorks COM/Automation User Guide and Reference Manual - 23 Mar 2017