You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
724 B

#pragma once
#define FW_@SYMBOL@_VERSION "@version@"
extern "C" const unsigned char fw_@symbol@_data[];
extern "C" const int fw_@symbol@_size;
extern "C" const int fw_@symbol@_version[4];
#ifdef _MSC_VER
#include <windows.h>
extern "C" IMAGE_DOS_HEADER __ImageBase;
#endif
static inline const unsigned char *fw_get_@symbol@(int &size)
{
#ifdef _MSC_VER
HRSRC rc = ::FindResourceA((HMODULE)&__ImageBase, "@SYMBOL@_DATA" , "@SYMBOL@_RC");
HGLOBAL data = ::LoadResource((HMODULE)&__ImageBase, rc);
size = ::SizeofResource((HMODULE)&__ImageBase, rc);
return static_cast<const unsigned char*>(::LockResource(data));
#else
size = fw_@symbol@_size;
return fw_@symbol@_data;
#endif
}