Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

INI Entry more that 255 Characters?

Status
Not open for further replies.

PCSAARON

Programmer
Jul 9, 2002
131
0
0
US
Doeas anyone know if an INI entry can have more that 255 characters for a value?


Aaron
 
Why not?
By using GetPrivateProfileString, WritePrivateProfileString you can. Just make sure that you have resized buffer.
 
I encountered lots of very long INI entries. Usually they were string-encoded binary keys or structures (printer settings, for example).

Best regards
 
Thanks for your quick responses. I did adjust the buffer sizes and it worked fine. Its just confusing when "STRING" in VB usually means 255 characters... Variant would be a better word I would think... Ah well, Microshaft, gotta love em!

Aaron
 
No. Strings are quite a bit larger nowadays. I think you can store about 30K in a string.
A variant is something different. It is halfway to a typeless type.

Best regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top