Windows binary can have resources embedded in them. Most resources are of predetermined type (e.g. a menu, an icon or a bitmap) but you can also embed arbitrary binary data (e.g. a text file). The proper syntax is hard to figure out just from reading msdn docs.
This snippet shows how to embed a binary resource from a file.
First you need to define a resource identifier in a header file (e.g.
resource.h) that will be used by both C compiler and resource compiler:
#define MY_RESOURCE 300
Then you need to add to your resource file (e.g.
MY_RESOURCE RCDATA "file-with-data.txt"
And finally, this is how you can get to this data:
HGLOBAL res_handle = NULL;
char * res_data;
// NOTE: providing g_hInstance is important, NULL might not work
res = FindResource(g_hInstance, MAKEINTRESOURCE(MY_RESOURCE), RT_RCDATA);
res_handle = LoadResource(NULL, res);
res_data = (char*)LockResource(res_handle);
res_size = SizeofResource(NULL, res);
/* you can now use the resource data */