English
Regulars table & Café

WritePrivateProfileString.

 


Description:

WritePrivateProfileString writes a String under the angegebenen Rubrik and the angegebenen Eintragsnamen in a INI File. These API can also whole Rubriken and Deleting Entries and the cache the INI on The Festplatte write.




Deklaration:

Def @WritePrivateProfileString(4) !KERNEL32,WritePrivateProfileStringA




Parameter:

1.Parameter: address one Strings or Memory-Variable with a String, the The Rubrik for entry contains. is this worth, Parameter 2 and Parameter 3 zero, becomes the cache the INI on The disk written.
2.Parameter: address one Strings or Memory-Variable with a String, the whom Eintragsnamen contains. is this worth 0, becomes The angegebene Rubrik deleted (unless, Parameter 1 is zero).
3.Parameter: address one Strings or Memory-Variable with a String, the whom hinzuzufügenden entry contains. is this worth 0, becomes the entry deleted (unless, Parameter 1 and 2 is zero).
4.Parameter: address one Strings or Memory-Variable with a String, the names and way the INI contains. existing The File not, becomes tappt im dunkeln created.



Return Value:

1 If the String successful registered watts, 0 with failure or if the cache on The Festplatte written watts.


Examples:

CompileMarkSeparation
Def @WritePrivateProfileString(4) !"KERNEL32","WritePrivateProfileStringA"
Declare Section$,Key$,Wert$,File$,FileLöschen&,SectionDel&,KeyLesen&,KeyDel&,Flush&
Windowstyle 31+512
Windowtitle "Die API WritePrivateProfileString"
Window 0,0-640,440
Let Section$="Eigene Daten"
Let Key$="Mein Eintrag"
Let Wert$="Mein Wert"
LET FILE$="C:TEST.INI"
Let FileLöschen&=@CreateButton(%HWND,"INI Löschen",20,200,150,30)
Let KeyLesen&=@CreateButton(%HWND,"Key "+Key$+" lesen",200,200,200,30)
Let Flush&=@CreateButton(%HWND,"INI flushen",450,200,150,30)
Let SectionDel&=@CreateButton(%HWND,"Sektion "+Section$+" Löschen",20,250,230,30)
Let KeyDel&=@CreateButton(%HWND,"Key "+Key$+" Löschen",280,250,230,30)
@WritePrivateProfileString(@Addr(Section$),@Addr(Key$),@Addr(Wert$),@Addr(File$))

While %MENUITEM<>-2

    Waitinput

    IF @Getfocus(KeyLesen&)

        Set("Errorlevel",-1)
        Print @READINI$(File$,Section$,Key$)
        Set("Errorlevel",0)

    ElseIF @Getfocus(SectionDel&)

        @WritePrivateProfileString(@Addr(Section$),0,0,@Addr(File$))
        Beep 1

    ElseIF @Getfocus(KeyDel&)

        @WritePrivateProfileString(@Addr(Section$),@Addr(Key$),0,@Addr(File$))
        Beep 1

    ElseIF @Getfocus(FileLöschen&)

        Assign #1,File$
        Erase #1
        Beep 1

    ElseIF @Getfocus(Flush&)

        @WritePrivateProfileString(0,0,0,@Addr(File$))
        Beep 1

    endif

function-references/XProfan/wend/'>Wend

 
03/29/05  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.699 Views

Untitledvor 0 min.

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie