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


API Reference


Brew Release
Brew MP 1.0.2
See Also
This function attempts to load the resource specified by type and ID from the specified resource context. The function either allocates memory or loads into a pre-allocated buffer. If the function allocates memory, it must be freed with ISHELL_FreeResData() after it is no longer needed.
Pointer to the IShell object.
Resource file containing the data.
ID of the data in the resource file.
The type of
Buffer into which to load the resource data. If pBuf is NULL, a buffer is allocated to hold the loaded resource, and must be freed with ISHELL_FreeResData(). If pBuf is -1, no buffer is allocated, but size information is calculated and returned in pnBufSize.
Cannot be NULL. [in] : if pBuf is not NULL or -1. INPUT points to the sizeof(pBuf) in bytes. If pBuf is NULL or -1, pnBufSize is ignored on INPUT. [out] : Contains the size of the resource data read. If pBuf was not NULL on INPUT and *pnBufSize was too small to hold the resource, the function returns NULL. If pBuf was -1, pnBufSize is filled with the actual resource size, and the function returns -1 (0xffffffff).
  •     void *ISHELL_LoadResDataEx
        IShell * pIShell,
        const char * pszResFile,
        uint16 nResID,
        ResType nType,
        void * pBuf,
        uint32 * pnBufSize
  • Void pointer to the resource data, if successful. NULL if loading the resource fails or if the buffer size is too small to hold the resource.
Side Effect
  • None
This function loads the *raw* contents of the resource. Any parsing or interpretation of the data is up to the application to perform. If loading a string resource, the contents of pBuf (and the returned void *) is the bytes of the string without NULL termination. If loading an image resource, the contents of pBuf is an AEEResBlob structure, whose raw data lies at RESBLOB_DATA(pBuf).