Como puedo usar GetPrivateProfileSection

14/11/2007 - 16:56 por Marc | Informe spam
Ola, hice lo siguente:

[DllImport("kernel32")]
/*DWORD WINAPI GetPrivateProfileSection( __in LPCTSTR lpAppName, __out
LPTSTR lpReturnedString, __in DWORD nSize,
__in LPCTSTR lpFileName);*/
private static extern int GetPrivateProfileSection(string section,
StringBuilder retVal, int size, string filePath);

hdl = GetPrivateProfileSection("DatabaseMainMapping", retVal, buflen,
".\\DataBaseManager.ini");
MessageBox.Show(retVal.ToString());

Pero en el 'retVal.ToString()' solo obtengo el primer valor. Solo uno
'key=value' cuando hay mas en el section.

Yo leo eso en MSDN pero no se que hacer, algun idea?
"The format of the returned keys and values is one or more null-terminated
strings, followed by a final null character. Each string has the following
form: key=string"

Gracias, Marcus
 

Leer las respuestas

#1 Marc
16/11/2007 - 13:42 | Informe spam
"Marc" wrote in

http://www.pinvoke.net/default.aspx...ction.html

Encontre lo ariba...

Preguntas similares