SB AWE32 Developer's Information Pack
PART III Windows Driver API
••
58
Copyright
Creative Technology Ltd., 1994-1996
Version 3.00
AWE_LOAD_USER_INSTR
Actions
An application sends this message to download a chunk of instrument presets
into the AWE DRAM. The loading can be either from file or direct from
memory area.
Parameters
lParam1
Specify a far pointer to CParamObject, LPPARAMOBJECT. The application
should fill the following fields with appropriate values:
Member
Remarks
m_UBankIndex
The index to designate User Bank.
m_InstrIndex
The index to an Instrument within the UBank.
The m_InstrIndex will be the instrument offset of the User Bank specified by
UBank Index. The m_InstrIndex must be a valid value between 0 to 127.
lParam2
Specify a far pointer to a CBufferObject data type, LPBUFFEROBJECT.
When the application calls the manager, the following fields are used:
Member
Remarks
m_Size
Indicates the size of buffer area.
m_SizeUsed
Indicates Instrument number of the bank located by
m_Buffer.
m_Flag
Indicates if buffer contains a path name.
m_Buffer
Far pointer to a buffer area.
The m_Flag field is used to indicate whether the User Bank will be loaded
from a file or from a chunk of memory buffer. The value of m_Flag should
be either OPER_MEMORY or OPER_FILE where OPER_MEMORY
indicates loading from memory buffer pointer by the m_Buffer and
OPER_FILE indicates loading from a file. The m_SizeUsed is loaded with
the Instrument index which will be loaded from the bank located by the
m_Buffer variable.
hUserID
Current ID assigned to the application by the AWE Manager during
initialization.
Remarks
The following are some important points to note when using this function.
The location passed in as pointer must be valid memory locations allocated
by the parent application. If the locations are invalid, it is possible to trip a
General Protection Fault in Windows.
It is recommend that the application use the macro defined by this API
library. The OPER_FILE and OPER_MEMORY are constant macros used to
distinguish between file loading or memory operations.
This function will overwrite any instrument presets previously attached to the
m_InstrIndex. No error or warning message is given.
Return
The return value would be AWE_NO_ERR if the operation is successful, and
an error code otherwise. Possible errors are: