Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 18,789 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How can I read a string from an ini file (or any file) #230606
10/06/08 22:45
10/06/08 22:45
Joined: May 2008
Posts: 123
B
BES Offline OP
Member
BES  Offline OP
Member
B

Joined: May 2008
Posts: 123
I tried to wrap the windows.h function GetPrivateProfileString, and it works; however, when I quit my application I get an error that spits out a bunch of garbled text and then says "invalid character". It crashes right after the statement in acklog:
Quote:
Free input,funcs,panels,defs,syns,views,strings

which I think is not coincidental. Somehow, the string that GetPrivateProfileString returns breaks the system when it tries to clean up the memory. I've tried copying strings over the return values, but I think I'm just creating a new string under the hood so that the bum string still sticks around until cleanup. Any insight into the error would be greatly appreciated!

Alternatively, any way to read blocks of text from a file would work.

Thanks so much for your time!

Re: How can I read a string from an ini file (or any file) [Re: BES] #230611
10/06/08 23:21
10/06/08 23:21
Joined: May 2008
Posts: 123
B
BES Offline OP
Member
BES  Offline OP
Member
B

Joined: May 2008
Posts: 123
For shame. Can't believe I missed file_open, file_find, and file_str_read, etc. This should work nicely.

Cheers!


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1