NextPrevUpTopContentsIndex

interface-ref

Macro
Summary

Accesses a place containing an interface pointer, maintaining reference counts.

Package

com

Signature

interface-ref iptr => iptr

(setf interface-ref) new-value iptr => new-value

Arguments

iptr

A place containing a COM interface pointer or nil .

new-value

A COM interface pointer or nil .

Description

interface-ref is useful when manipulating a place containing an interface pointer.

The setf expander increments the reference count, as if by add-ref, of new-value , unless it is nil . It then decrements the reference count, as if by release, of the existing value in iptr , unless this is nil . Note that this order is important in the case that the new value is the same as the current value. Finally the value of place iptr is set to new-value .

The reader interface-ref simply returns its argument and does no reference counting. It may be useful in a form which both reads and writes a place like incf .

See also

add-ref
release


LispWorks COM/Automation User Guide and Reference Manual - 17 Jul 2006

NextPrevUpTopContentsIndex