What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Request] Read, write and delete from/to ini file

[Request] Read, write and delete from/to ini file
Author: Message:
felipEx
Scripting Contest Winner
***


Posts: 378
Reputation: 24
35 / Male / Flag
Joined: Jun 2006
RE: [Request] Read, write and delete from/to ini file
try this :)
code:
function DeleteHeader(path, header){
Interop.Call('kernel32', 'WritePrivateProfileSectionW', header.toString(), 0, path )
}

function DeleteKey(path, header, key){
Interop.Call('kernel32', 'WritePrivateProfileStringW', header.toString(), key.toString(), 0, path)
}

function WriteIni(path, header, key, value){
Interop.Call('kernel32', 'WritePrivateProfileStringW', header.toString(), key.toString(), value.toString(), path);
}

function ReadIni(path, header, key, default_value){
    var cRetVal = Interop.Allocate(2 * (256 + 1) );
    var lTmp = Interop.Call('kernel32','GetPrivateProfileStringW', header, key.toString(), default_value.toString(), cRetVal, cRetVal.Size, path);
    return lTmp == 0 ? default_value : cRetVal.ReadString(0);
}


04-23-2008 09:56 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Request] Read, write and delete from/to ini file - by Skarbo on 04-23-2008 at 09:21 AM
RE: [Request] Read, write and delete from/to ini file - by felipEx on 04-23-2008 at 09:56 AM
RE: [Request] Read, write and delete from/to ini file - by Skarbo on 04-23-2008 at 10:15 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On