-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e95c91a
commit a599355
Showing
4 changed files
with
125 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.IO; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace OpenCorepiAndBypass.src | ||
{ | ||
class IniFile | ||
{ | ||
string path; | ||
|
||
[DllImport("kernel32")] | ||
private static extern long WritePrivateProfileString(string section, string key, string val, string filePath); | ||
|
||
[DllImport("kernel32")] | ||
private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath); | ||
|
||
public IniFile(string INIPath) | ||
{ | ||
path = INIPath; | ||
} | ||
|
||
public void WriteValue(string Section, string Key, string Value) | ||
{ | ||
WritePrivateProfileString(Section, Key, Value, this.path); | ||
} | ||
|
||
public string ReadValue(string Section, string Key) | ||
{ | ||
StringBuilder temp = new StringBuilder(255); | ||
int i = GetPrivateProfileString(Section, Key, "", temp, 255, this.path); | ||
return temp.ToString(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters