Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 11:02

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Read ini From Windows Dir

Discussion on Read ini From Windows Dir within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1
 
PsychoXReaper's Avatar
 
elite*gold: 24
Join Date: Feb 2012
Posts: 1,173
Received Thanks: 3,113
Read ini From Windows Dir

hey guys i wanna help on how to Read a ini From a Windows path since some people have their windows on "E,D,F" ETC not only the "C" Drive
thats the code to read

GetPrivateProfileIntA("Section", "Key", Default Value,"my_file.ini")
PsychoXReaper is offline  
Old 06/17/2012, 14:32   #2
 
2n0w's Avatar
 
elite*gold: 0
Join Date: Feb 2012
Posts: 115
Received Thanks: 18
getenv("SystemDrive");
Returns char*.
If you mean the Windows dir, you could also use getenv("WINDIR").
By the way:
Quote:
This function is provided only for compatibility with 16-bit Windows-based applications. Applications should store initialization information in the registry.
2n0w is offline  
Old 06/17/2012, 16:11   #3
 
Tyrar's Avatar
 
elite*gold: 0
Join Date: Oct 2008
Posts: 1,637
Received Thanks: 1,119
Code:
TCHAR path[MAX_PATH]; // nothing to say?
GetSystemDirectory(path,MAX_PATH); // copy system path into 'path'
lstrcat(path,_T("\\yourfile.ini")); // append "\yourfile.ini" to 'path'

GetPrivateProfileInt(_T("Section"),_T("Key"),DefaultValue,path); // read value
this should work.
Tyrar is offline  
Reply


Similar Threads Similar Threads
Battle Pirates **READ**READ**READ**
05/02/2012 - Facebook - 37 Replies
Be smart when using the hacks now, Kixeye is banning by ip address now!
[mini guide] Having problems getting hacks to work(vista, windows xp)? read this!
10/13/2009 - Ace Online / AirRivals - 55 Replies
I read some posts and noticed that some people are having trouble getting some of the hacks on the Ace-X Trainer to work. I had the same problem as well, but by lucky coincidence i found out how to solve this. Hope this helps those people :) For windows xp: 1: open up AirRivals (recommend small screen window mode ) 2: take off 3:do a mid air stop, open up Ace-X trainer, and log in 4: place the trainer so that the "read all values" button is somewhere outside the game screen, whether...
READ READ READ !!! LORDYK93 SCAMMER
10/11/2009 - Silkroad Online Trading - 1 Replies
he scammed a ecsro vip account from me ... he wanna give a lvl 90 sjsro account he change the pw of my account and said i have to wait ... now hes on at epvpers and on in msn but he didnt answer me anymore if you answer me and give me my vip account back i will delete this.!
READ IMPORTANT (WINDOWS.EXE)
09/09/2009 - 12Sky2 - 0 Replies
I quit now =)
How to Read memory code in 64 Bit Windows
07/19/2009 - CO2 Programming - 0 Replies
1st, sorry to post a question here but here goes. 1. I am no programmer (Network Admin / Manager here). 2. I am thinking of starting to learn (Noob to programming). 3. Just installed Visual Studio 2008 x64. 4. Windows 7 64 Bit. So what you see before this are the facts. I did some investigations using cheat Engine but always the memory addresses for me were always a skew.



All times are GMT +1. The time now is 11:03.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.