MOA Developer's Guide
MOA Interfaces | MOA Methods | MOA Types and Misc API
IMoaUnknown
Interface ID: IID_IMoaUnknown
Pointer type: PIMoaUnknown
Inheritance: none
Header file: moaxtra.h
Description
-
IMoaUnknown is the
root interface for all MOA interfaces. All MOA objects and interfaces
inherit the IMoaUnknown interface. This interface allows you to query any object--or any
interface belonging to an object--for other interfaces of that
object. IMoaUnknown also supports the reference counting mechanism used to track instances
of MOA interfaces and to determine when they can be released from
memory. MOA provides a default implementation of this interface,
intended to be used by all MOA objects.
Methods
-
- AddRef()
QueryInterface()
Release()
Syntax
-
- MoaError AddRef(IMoaUnknown FAR * This)
Parameters
-
This
- Instance of a specified interface
Returns
-
- MoaError
Description
-
- Increments the reference count of an existing interface. Call
this method when passing an existing interface to code that may
need to retain the interface for itself. That code becomes responsible
for calling Release() on the interface when it is through using it.
Syntax
-
- MoaError QueryInterface(IMoaUnknown FAR * This,
ConstIIDPtr pInterfaceID,
void FAR * FAR * ppvObj)
Parameters
-
This
- Interface of object being queried
pInterfaceID
- IID of interface being requested
ppvObj
- Interface pointer of type being requested
Returns
-
MoaError
Description
-
- Queries an interface to request another interface provided
by the same object. Creates an instance of that interface (if
none exists) and increments the reference count of the interface.
Returns the result in ppvObj,
a previously allocated pointer of the interface type being requested.
Syntax
-
- MoaError Release(IMoaUnknown FAR * This)
Parameters
-
This
- Interface instance to be released.
Returns
-
MoaError
Description
-
- Decrements the reference count of the interface instance This.
Releases the instance if its reference count drops to zero.
Copyright © 1995-2007 Adobe Macromedia Software LLC, Inc.