#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 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(::LockResource(data)); #else size = fw_@symbol@_size; return fw_@symbol@_data; #endif }