G
Guest
"
You can fix this by declaring sBuf as a normal string and initializing it to
a fixed length with the Space function:
Dim sBuf As String = Space(128)The new VB.NET declaration syntax lets you
declare and initialize the variable on the same line. You use the sBuf
string's Length method to return its length. The function call to return an
INI string now looks like this:
lRet = GetPrivateProfileString (Section, KeyName, _
DefaultValue, sBuf, sBuf.Length, msININame)"Segun Microsoft esta es la
forma de implementar esta API en .net, pero no funciona,¿Alguien sabe por
qué?Saludosjmpedrero
You can fix this by declaring sBuf as a normal string and initializing it to
a fixed length with the Space function:
Dim sBuf As String = Space(128)The new VB.NET declaration syntax lets you
declare and initialize the variable on the same line. You use the sBuf
string's Length method to return its length. The function call to return an
INI string now looks like this:
lRet = GetPrivateProfileString (Section, KeyName, _
DefaultValue, sBuf, sBuf.Length, msININame)"Segun Microsoft esta es la
forma de implementar esta API en .net, pero no funciona,¿Alguien sabe por
qué?Saludosjmpedrero