Elaztek Developer Hub
Blamite Game Engine - Strings  00328.08.01.21.1142.blamite
A library containing general purpose utilities and classes for use in multiple projects.
BlamStrings::Utils::Res Namespace Reference

Utilities relating to application resources. More...

Functions

STRINGS_API std::string GetTextResource (HMODULE module_handle, int res_id, const char *res_type)
 Retrieves the specified resource as a text resource. More...
 
STRINGS_API std::string GetHTMLResource (HMODULE module_handle, int res_id)
 Retrieves the specified resource as an HTML resource. More...
 
STRINGS_API HRESULT GetResource (HMODULE module_handle, int res_id, const char *res_type, BlamWin32ResourceData *res)
 Retrieves the specified resource as a Resource structure, containing access to the raw binary data. More...
 

Detailed Description

Utilities relating to application resources.

Function Documentation

◆ GetHTMLResource()

std::string BlamStrings::Utils::Res::GetHTMLResource ( HMODULE  module_handle,
int  res_id 
)

Retrieves the specified resource as an HTML resource.

Parameters
res_id- The ID of the resource to read.
Returns
The HTML content of the resource data as a string.

◆ GetResource()

HRESULT BlamStrings::Utils::Res::GetResource ( HMODULE  module_handle,
int  res_id,
const char *  res_type,
BlamWin32ResourceData res 
)

Retrieves the specified resource as a Resource structure, containing access to the raw binary data.

Used for anything that isn't plain text.

Parameters
res_id- The ID of the resource to read.
res_type- The type of resource being read.
res- Pointer to set to the new resource.
Returns
S_OK if the resource was read, E_FAIL if it was not.

◆ GetTextResource()

std::string BlamStrings::Utils::Res::GetTextResource ( HMODULE  module_handle,
int  res_id,
const char *  res_type 
)

Retrieves the specified resource as a text resource.

Parameters
res_id- The ID of the resource to read.
res_type- The type of resource being read.
Returns
The text of the resource data.