Hello,
I don't know about VB. It looks like you know the same thing about C++. :)
There are too many mistakes in the code you posted. For instance:
Code:
char *res;
GetPrivateProfileString(*Seccion, *Key,"-1", res, *nCant, *FileIni );
When you declare a pointer to char it means you get exactly what you requested: a pointer to char; you do not get a pointer and space to store some characters. GetPrivateProfileString will try to store the result into the space pointed by res. But res points to a random location.
You must read a bit (more) about C++. Sorry...