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

IMoaAppInfo


Interface ID: IID_IMoaAppInfo
Pointer type: PIMoaAppInfo
Inheritance: IMoaUnknown
Header file: moastdif.h

Description

This interface consists of one method that provides information about the host application to Xtras. This information can be used at registration time to determine if the characteristics of the host match the capabilities of the Xtra. For example, an Xtra can determine whether the application is in authoring or playback mode (where applicable) and apply the appropriate behavior. An Xtra can also implement security mechanisms using information provided by this interface. For example, you can require the user to enter a serial number for the Xtra at registration time by implementing the IMoaRegister interface. You could then use the IMoaCache interface to store the serial number of the application provided by IMoaAppInfo, Finally, you could implement the IMoaInitFromDict interface to check the cached entry against that provided by IMoaAppInfo at Xtra initialization time.

See also

IMoaAppInfo constants

Methods

GetInfo()

GetInfo()

Syntax

MoaError GetInfo(MoaLong desiredInfo, PMoaChar pInfoBuffer, MoaLong infoBufferLen )

Parameters

desiredInfo
Indicates what info you want

pInfoBuffer
Pointer to a buffer where the info will get stored

infoBufferLen
Length of buffer you are providing

Returns

kMoaErr_BadParam If buffer passed is too small to contain information
kMoaErr_NoSuchKey If app doesn't support the desiredInfo
kMoaErr_NoErr Everything OK

Description

Get information about the Xtra's host application. The desiredInfo parameter specifies the type of information being requested; it can be one of the following enumerated constants:
Constant Description
kMoaAppInfo_SerialNumber Application serial number as a string. Format of a serial number is unspecified, except that it is guaranteed to be less than 256 bytes long. An empty string may be returned.
kMoaAppInfo_RunMode RunMode of the host environment as a string. Defined modes are:
"Author" authoring application
"Projector" projector-only application
"Plugin" browser plug-in or ActiveX control
"Exporter" special exporter application that supports xtras
These values are not localized.
kMoaAppInfo_UserName the user name entered at registration.
kMoaAppInfo_OrganizationName the company/organization name entered at registration.
kMoaAppInfo_AppFileSpec a MoaSystemFileSpec to the application/projector executable. This is a MoaSystemFileSpec, not a character string, thus on the Macintosh you will receive an FSSpec.
kMoaAppInfo_ProductName The name of the product, minus version information. This is not localized. Currently defined are "Director", "SoundEdit", "FreeHand"
kMoaAppInfo_ProductVersion Version of the product, generally a character string representing a number, though it may include letters as well, e.g., "5.0","5.0a", "5.5"
kMoaAppInfo_UILanguage The language of the authoring application, (if known), otherwise the language of the currently running OS.
kMoaAppInfo_OSLanguage The language of the currently running OS
kMoaAppInfo_ConfigFolder a MoaSystemFileSpec to the application's user-writable configuration folder (Director MX 2004)

Note that not all apps will support all these; you must be prepared for an app to return kMoaErr_NoSuchKey for any or all of these. Additional values may be added in the future.

The parameters pInfoBuffer and infoBufferLen provide the application with a buffer to write the corresponding information to.


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