I'm using the WritePrivateProfileStruct function to work with .ini files for my game, and I have a quick question. This is how I've implemented it:
WritePrivateProfileStruct("Section", "Key", &Data, -1, "settings.ini");
Here, Data is an int. I sort of guessed the third and fourth parameters - is it OK to use it like I did, or should I do it differently? The function asks for an LPVOID for the third parameter - is it OK for my to provide a pointer to my int as I have done? I can't find any other examples out there so I don't know if I've done it right or not.