Kylix
Tips

NEW TIPS
Database (135)
Files (612)
Forms (606)
Graphic (536)
IDE (456)
Indy (433)
Internet / LAN (590)
IntraWeb (443)
Kylix (447)
Math (561)
Misc (591)
Multimedia (496)
Objects/
ActiveX (503)

OpenTools API (438)
Printing (459)
Strings (583)
System (721)
VCL (586)

Search Tip
Top15
Add new Tip

Forum

...clear a Varaible from RAM?
Author: Superhausi
Homepage: http://www.superhausi.ch
[ Print tip ]    

Tip Rating (3):  
     



If you want to erase a variable, that no other program
can read it out of the memory anymore, just use this function:

ZeroMemory(Addr(yourVar), SizeOf(yourVar));
ZeroMemory(Addr(yourStr), Length(yourStr));

// ZeroMemory(Address of the variable, Size of the variable);

Very usefull, if you asked for a password and you want,
that nobody other can get it.

{***}

Falls Sie eine Variable (z.B. ein Passwort) wirklich aus dem Speicher löschen wollen,
damit kein anderes Programm mehr das auslesen kann, benützen Sie folgende Funktion:

ZeroMemory(Addr(yourVar), SizeOf(yourVar));
ZeroMemory(Addr(yourStr), Length(yourStr));

// ZeroMemory(Addresse der Variable, Grösse der Variable);

Sehr nützlich, falls Sie vielleicht ein Passwort eingelesen haben und nicht möchten,
dass noch ein anderer das sehen kann.

Rate this tip:

poor
very good


Copyright © Torry's Delphi Pages Torry's Delphi Pages Maintained by Simon Grossenbacher Notes? Comments? Feel free to send... Copyright © 1996-2001