Sol9000
Technical User
- Aug 12, 2008
- 2
I lost the harddrive holding all of my VB5 reference sample code and I'm trying to find a good code sample of the GetPrivateProfileString for INI files. I need the whole chunk of code for it, including the defining and assigning of all string values for the GetPrivateProfileString statement.
Example:
Public Function Read_INI()
lpAppName = App.EXEName
lpKeyName = ShellExpression1
lpString = HyperShell1
lpDefault = ""
lpReturnedString = Space(nSize)
nSize = Int(256)
lpFileName = App.Path + "\" + "MultiCast1.INI"
GetPrivateProfileStringA(string lpAppName, string lpKeyName, string lpDefault, lpReturnedString, nSize, string lpFileName);
End Function
I know that this sample of code isn't quite right, but I can't remember how it all went. This is the first programming I've done in a while, but if you could provide an example like the sample I gave above, I would be ecstatic! And remember, this is VB5, not 6.
Thanks!
Sol
Example:
Public Function Read_INI()
lpAppName = App.EXEName
lpKeyName = ShellExpression1
lpString = HyperShell1
lpDefault = ""
lpReturnedString = Space(nSize)
nSize = Int(256)
lpFileName = App.Path + "\" + "MultiCast1.INI"
GetPrivateProfileStringA(string lpAppName, string lpKeyName, string lpDefault, lpReturnedString, nSize, string lpFileName);
End Function
I know that this sample of code isn't quite right, but I can't remember how it all went. This is the first programming I've done in a while, but if you could provide an example like the sample I gave above, I would be ecstatic! And remember, this is VB5, not 6.
Thanks!
Sol