MOA Developer's Guide
MOA Interfaces | MOA Methods | MOA Types and Misc API

IMoaCallback


Interface ID: IID_IMoaCallback
Pointer type: PIMoaCallback
Inheritance: IMoaUnknown
Header file: moaxtra.h

Description

This standard MOA interface is implemented by the application's callback object for the use of Xtras. It provides methods for accessing other interfaces belonging to the application, for acquiring and releasing resources for use by the Xtra, for accessing the application cache, and for creating instances of MOA classes and interfaces. All MOA objects have an instance variable, pCallback, that refers to this interface of the application's callback object.

Methods

Creating an instance

MoaCreateInstance()

Getting a cache

MoaGetCache()

Using Resources

MoaBeginUsingResources()
MoaEndUsingResources()

MoaBeginUsingResources()

Syntax

MoaBeginUsingResources(PIMoaCallbackThis,

MoaFileReffileRef,
XtraResourceCookie FAR *pSaveCookie)

Parameters

This
Pointer to the IMoaCallback interface

fileRef
MoaFileRefFile reference

pSaveCookie
XtraResourceCookie FAR *Resource cookie for the file

Returns

XtraResourceCookie

Description

Opens, if necessary, and returns an identifier for the resources in the file represented by fileRef. When it opens your Xtra, MOA creates the global gXtraFileRef to refers to your Xtra's file (global within the namespace of your Xtra). Pass this global as the fileRef parameter. The parameter pSaveCookie returns a reference to the resource file to use in calling the method MoaEndUsingResources().

MoaCreateInstance()

Syntax

MoaCreateInstance(PIMoaCallback This,
ConstPMoaClassID pClassID,
ConstPMoaInterfaceID pInterfaceID,
PPMoaVoid ppvOb)

Parameters

This
Pointer to the IMoaCallback interface

pClassID
ConstPMoaClassIDCLSID for the class being instantiated

pInterfaceID
ConstPMoaInterfaceIDIID for the interface being instantiated

ppvOb
PPMoaVoidPointer to interface of type pInterfaceID

Returns

MoaError

Description

Create and initialize an object of the class with CLSID pClassID, and return a pointer to the interface with IID pInterfaceID. MOA will choose the class and interface from the correct Xtra, and return a pointer to the interface in ppUnknown. In the event of duplicate class ID's, the Xtra containing the most recent version will be used (according to the information provided when the Xtra is loaded).

MoaEndUsingResources()

Syntax

MoaEndUsingResources(PIMoaCallbackThis,

MoaFileReffileRef,
XtraResourceCookiesaveCookie)

Parameters

This
Pointer to the IMoaCallback interface

fileRef
MoaFileRefFile reference

saveCookie
XtraResourceCookieResource cookie for the file

Returns

void

Description

Closes the resource file represented by fileRef and previously opened with the MoaBeginUsingResources() method.

MoaGetCache()

Syntax

MoaGetCache(PIMoaCallbackThis)

Parameters

This
Pointer to the IMoaCallback interface

Returns

IMoaCache Applications interface

Description

Call this method to access the application cache from within your Xtra.

Copyright © 1995-2007 Adobe Macromedia Software LLC, Inc.