Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, VoroneTZ, 1 invisible), 1,529 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 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 | chip programmers | 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