Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[VB6] Reading INI files

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
homer_simpson
Grandmaster Cheater
Reputation: 0

Joined: 25 Feb 2007
Posts: 596

PostPosted: Sat Feb 16, 2008 12:18 pm    Post subject: [VB6] Reading INI files Reply with quote

I know the API but i cant seem to find a good tut on google.
Imagine i wanted to read this Ini file:

[Test]
Valueofbytes=29

And put the Valueofbytes thing on a Textbox.
Could some one make me a sample?
Back to top
View user's profile Send private message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Sat Feb 16, 2008 12:23 pm    Post subject: Reply with quote

I would personally recomend you to use a xml instead of a ini.
They are so out of date you know.

_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
homer_simpson
Grandmaster Cheater
Reputation: 0

Joined: 25 Feb 2007
Posts: 596

PostPosted: Sat Feb 16, 2008 12:24 pm    Post subject: Reply with quote

So whats easyer to make a ini or xml?
PS: Aww and simpathised with ini files... Razz
Back to top
View user's profile Send private message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Sat Feb 16, 2008 12:43 pm    Post subject: Reply with quote

homer_simpson wrote:
So whats easyer to make a ini or xml?
PS: Aww and simpathised with ini files... Razz

easier isn't equal to better. You must learn of that.

_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
homer_simpson
Grandmaster Cheater
Reputation: 0

Joined: 25 Feb 2007
Posts: 596

PostPosted: Sat Feb 16, 2008 12:49 pm    Post subject: Reply with quote

k gothcha but first of all can VB6 write xml files and then load them?
Back to top
View user's profile Send private message
AtheistCrusader
Grandmaster Cheater
Reputation: 6

Joined: 23 Sep 2006
Posts: 681

PostPosted: Sat Feb 16, 2008 12:49 pm    Post subject: Reply with quote

search! I even posted writing/reading INI files in here general programming
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sun Feb 17, 2008 1:28 pm    Post subject: Reply with quote

Eh, INIs are hardly outdated and are probably still one of the most used. Anyway, you will need the following API to read from an INI:

GetPrivateProfileInt
GetPrivateProfileSection
GetPrivateProfileSectionNames
GetPrivateProfileString

And for writing to:

WritePrivateProfileSection
WritePrivateProfileString

If you haven't guessed already, beings that INI files are text files, you don't write numeric values back to the file. You always write strings. So thats why theres only 2 write functions.

You can find all these API on the MSDN website, or over at allapi.net along with examples.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites