API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

ISHELL_LOADRESOBJECT()

Brew Release
Brew MP 1.0.2
See Also
AEE_RES_LANGSUF AEE_RES_LANGDIR IShell ISHELL_FreeResData ISHELL_LoadImage ISHELL_LoadResData ISHELL_LoadResImage ISHELL_LoadResSound ISHELL_LoadResString ISHELL_LoadSound ISHELL_RegisterHandler
Description
This function loads the specified resource and creates a handler that can be used on the resource data. The type of handler created is indicated by hType.
Params
pIShell
[]:
Pointer to the IShell interface object.
pszResFile
[]:
Resource file containing the specified resource.
nResID
[]:
ID of the resource in the resource file.
hType
[]:
Type of handler that must be created and associated with the resource data. Note that the interface pointer returned from this function depends on the specified handler type. The AEEHandlerType must coincide with the actual type of the resource data.
Interface
  • ISHELL
Prototype
  •     IBase * ISHELL_LoadResObject
        (
        IShell * pIShell,
        const char * pszResFile,
        int16 nResID,
        AEEHandlerType hType
        );
    
Return
  • Pointer to handle the resource data : if successful.
    NULL : if unsuccessful.
Side Effect
  • None
Comments
For example: If the resource data is of type HTYPE_SOUND and if the hType parameter is set to HTYPE_VIEWER, the behavior of this function is unpredictable. If hType is HTYPE_VIEWER, it indicates that the resource data is a bitmap resource. This function creates an IImage interface and associates the resource data with it. The IImage interface pointer is then returned from this function. This interface pointer can be used to view the image. If hType is HTYPE_SOUND, it indicates that the resource data is a sound stream. In this case, this function creates and returns an ISoundPlayer interface pointer that can then be used to play the sound. ISHELL_LoadResImage() and ISHELL_LoadResSound() are specific usages of this function with the hType set to HTYPE_VIEWER and HTYPE_SOUND, respectively.