English
Source / code snippets

Delete Registry Registryschlüssel worth

 

Source watts on the 15.07.2007 from the MMJ-Quellcodesammlung (Dietmar horn) in The Babyklappe on XProfan.Com stored:
Registry: worth in one Registryschlüssel delete
RegDeleteValue deletes a worth in one Registryschlüssel
L1(Param.1 Longint ): lever one already opened Keys as LongInt or following vordefinierte values =>
HKEY_CLASSES_ROOT = $80000000
HKEY_CURRENT_USER = $80000001
HKEY_LOCAL_MACHINE = $80000002
HKEY_USERS = $80000003
L2(Param.2 Longint ) or B3(Param.3 area ): lever or Memory-Variable with the names the Wertes, the deleted go should.
Declare lever#,Fehler&,Key#,name#,worth#,Size#,Type#,Button&,Button2&
Declare Writewert$,worth2#
Def @Regclosekey(1) !ADVAPI32,RegCloseKey
Def @Regsetvalueex(6) !ADVAPI32,RegSetValueExA
Def @Regcreatekey(3)!ADVAPI32,RegCreateKeyA
Def @Regdeletekey(2) !ADVAPI32,RegDeleteKeyA
Def @Regdeletevalue(2) !ADVAPI32,RegDeleteValueA
Def @Regopenkeyex(5) !ADVAPI32,RegOpenKeyExA
Windowstyle 31
Windowtitle Registryschlüssel create
Window 0,0-640,440
Let Button&=@Createbutton(%Hwnd,Key delete,20,300,200,30)
Let Button2&=@Createbutton(%Hwnd,values delete,320,300,200,30)
Dim Key#,260
Dim lever#,4
Dim name#,250
Dim Size#,4
Dim worth#,260
Dim worth2#,4
Dim Type#,4
String Key#,0=SoftwareMMJ-Test
Let Fehler&=@Regcreatekey($80000001,Key#,lever#)
Print Error Code at create/Öffenen the Schlüssels SoftwareMMJ-Test: ;Fehler&

If Fehler&=0

    Let Writewert$=my software
    String worth#,0=Softwarepfad
    Let Fehler&=@Regsetvalueex(@Long(lever#,0),@Addr(Writewert$),0,1,worth#,@Len(Softwarepfad)+1)
    Print Error Code RegSetValueEx Softwarepfad: ;Fehler&
    Let Writewert$=serial number
    Long worth2#,0=22334
    Let Fehler&=@Regsetvalueex(@Long(lever#,0),@Addr(Writewert$),0,4,worth#,4)
    Print Error Code RegSetValueEx serial number: ;Fehler&
    Let Writewert$=Byteliste
    Clear worth#
    byte worth#,0=65
    byte worth#,1=66
    byte worth#,2=67
    byte worth#,3=68
    Let Fehler&=@Regsetvalueex(@Long(lever#,0),@Addr(Writewert$),0,3,worth#,10)
    Print Error Code RegSetValueEx Byteliste: ;Fehler&
    Print Error Code RegCloseKey: ;@Regclosekey(@Long(lever#,0))

Endif

Dispose Type#
Dispose worth#
Dispose worth2#
Dispose Key#
Dispose lever#
Dispose name#
Dispose Size#

While 0=0

    Waitinput

    If @Getfocus(Button&)

        Dim Key#,260
        Print
        String Key#,0=SoftwareMMJ-Test
        Let Fehler&=@Regdeletekey($80000001,Key#)
        Print Error Code at Delete the Schlüssels SoftwareMMJ-Test: ;Fehler&
        Dispose Key#
        @Setfocus(%Hwnd)

    Elseif @Getfocus(Button2&)

        Print
        Dim Key#,260
        Dim lever#,4
        Dim name#,256
        String Key#,0=SoftwareMMJ-Test
        Let Fehler&=@Regopenkeyex($80000001,Key#,0,$F003f,lever#)
        Print Error Code at Öffnen the Schlüssels SoftwareMMJ-Test: ;Fehler&

        If Fehler&=0

            String name#,0=my software
            Let Fehler&=@Regdeletevalue(@Long(lever#,0),name#)
            Print Error Code at Delete the Wertes my software: ;Fehler&
            String name#,0=serial number
            Let Fehler&=@Regdeletevalue(@Long(lever#,0),name#)
            Print Error Code at Delete the Wertes serial number: ;Fehler&
            String name#,0=Byteliste
            Let Fehler&=@Regdeletevalue(@Long(lever#,0),name#)
            Print Error Code at Delete the Wertes Byteliste: ;Fehler&
            Print Error Code RegCloseKey: ;@Regclosekey(@Long(lever#,0))

        Endif

        Dispose Key#
        Dispose lever#
        Dispose name#
        @Setfocus(%Hwnd)

    Endif

Wend

 
07/16/07  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.302 Views

Untitledvor 0 min.
Georg Teles03/26/23
AndreasS12/02/18
Andre Rohland01/31/18
Wilfried Friebe06/23/12
More...

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