I have an .ini file which is located inside the resource as an RCDATA. I load it from the resource during runtime, and I am able to get it as a very long string.
I am interested of loading the .ini file (from the resource at runtime) and parse it as an .ini file using Boost or Win32 API but the question is how do I do it ?
It seems that it is possible of doing such thing using QT.
I have tried loading the resource file and assigning read_ini()
the binary data/string file but it doesn't iterate over it afterwards.
Is it possible of doing such thing ?
Code snip:
HRSRC myResource = FindResource(NULL, MAKEINTRESOURCE(101), RT_RCDATA);
unsigned int myResourceSize = SizeofResource(NULL, myResource);
HGLOBAL myResourceData = LoadResource(NULL, myResource);
char* pMyBinaryData = (char*)LockResource(myResourceData);
char *text = (char*)malloc(myResourceSize + 1);
memcpy(text, pMyBinaryData, myResourceSize);
text[myResourceSize] = 0;//last char array is null
FreeResource(myResourceData);
The way I extract the text inside the .txt/.ini file.