English
Regulars table & Café

GetPrivateProfileStruct.

 


Description:

GetPrivateProfileStruct list a Bytefolge a INI from, errechnet a Checksumme and vergleicht these with the Checksumme, The of WritePrivateProfileStruct on whom entry appended watts.




Deklaration:

Def @GetPrivateProfileStruct(5) !KERNEL32,GetPrivateProfileStructA




Parameter:

1.Parameter: address one Strings or Memory-Variable with a String, the The Rubrik the Eintrags contains.
2.Parameter: address one Strings or Memory-Variable with a String, the whom Eintragsnamen contains.
3.Parameter: Memory-Variable The The ausgelesenen data aufnimmt.
4.Parameter: Size the Bereichs from Parameter 3 in Bytes as LongInt. The Size the Bereichs must exakt the Size the with WritePrivateProfileStruct written Bereichs correspond to, there otherwise no data read go.
5.Parameter: address one Strings or Memory-Variable with a String, the names and way the INI contains.



Return Value:

1 with success, 0 with failure.


Examples:

CompileMarkSeparation
Def @WritePrivateProfileStruct(5) !KERNEL32,WritePrivateProfileStructA
Def @GetPrivateProfileStruct(5) !KERNEL32,GetPrivateProfileStructA
Declare Section$,Key$,Wert$,File$,FileLöschen&,SectionDel&,KeyLesen&,KeyDel&,Flush&,Buffer#,Buffer%
DEclare Ausgelesen#,Ausgelesen$,Default$,Länge%
Windowstyle 31+512
Windowtitle Struktur in eine INI schreiben und auslesen
Window 0,0-640,440
Let Section$=Eigene Daten
Let Key$=Mein Eintrag
Let Wert$=Mein eigener 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)
Let Buffer%=@len(Wert$)+1
Dim Buffer#,Buffer%
Clear Buffer#
String Buffer#,0=Wert$
@WritePrivateProfileStruct(@Addr(Section$),@Addr(Key$),Buffer#,Buffer%,@Addr(File$))
Dispose Buffer#

While %MENUITEM<>-2

    Waitinput

    IF @Getfocus(KeyLesen&)

        CLS
        Locate 0,0
        Set(Errorlevel,-1)
        Let Buffer%=((@len(@READINI$(File$,Section$,Key$))-2)/2)
        LET AUSGELESEN$=@READINI$(File$,Section$,Key$)
        Set(Errorlevel,0)
        CASE BUFFER%<=0 : Let Buffer%=4
        DIM Ausgelesen#,Buffer%
        Clear Ausgelesen#
        PRINT Ausgelesene Struktur=+AUSGELESEN$
        @GetPrivateProfileStruct(@Addr(Section$),@Addr(Key$),Ausgelesen#,Buffer%,@Addr(File$))
        Print Ausgelesener String=+@String$(Ausgelesen#,0)
        LET Länge%=@len(AUSGELESEN$)-@len(@String$(Ausgelesen#,0))*2
        PRINT Checksumme=$+@RIGHT$(AUSGELESEN$,Länge%)
        Dispose Ausgelesen#
        Beep 1

    ElseIF @Getfocus(SectionDel&)

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

    ElseIF @Getfocus(KeyDel&)

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

    ElseIF @Getfocus(FileLöschen&)

        Assign #1,File$
        Erase #1
        Beep 1

    ElseIF @Getfocus(Flush&)

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

    endif

ss=s4 href='./../../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

3.407 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