⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 computer locker - fancy delphi application contest entry #47.htm

📁 What happens with your machine when you need to move away from the computer for 10 or more minutes?
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><title>Computer Locker - Fancy Delphi Application Contest Entry #47</title><meta name="keywords" content="dephi, computer, lock, password, shut down, login, restart, Delphi Application, Contest, source code, Dagan Hoover "><meta name="description" content="What happens with your machine when you need to move away from the computer for 10 or more minutes? How secure is your data? Can someone sit on your chair while you are at a coworkers office and play with your data? Maybe you need a computer locking tool that is small and easy to use yet powerful enough to make sure your machine is locked when you need to go out for a break.&#10;"><meta http-equiv="X-UA-Compatible" content="IE=8"><meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"><meta name="ROBOTS" content="NOODP"><meta name="pd" content="Monday, 08-Dec-2008 21:05:00 GMT"><meta http-equiv="P3P" content='policyref="http://w.about.com/w3c/p3p.xml"'><link rel="P3Pv1" href="http://w.about.com/w3c/p3p.xml" type="text/xml"><link rel="shortcut icon" href="http://z.about.com/m/a08.ico"><link rel="search" type="application/opensearchdescription+xml" href="http://z.about.com/0/dc/osrch.htm" title="About.com"><script type="text/javascript">var ziRfw=0;function zIpSS(u){zpu(0,u,280,375,"ssWin")}function zIlb(l,t,f){var u=new Array([["1/XJ/W9","1/XJ/WP"],["1/XK/WB","1/XK/WQ"],["18/15m","1/XL/WR"]],[["18/15o","18/1Pp"]],[["1/XJ/WA","1/XJ/WP"],["1/XK/WC","1/XK/WQ"],["18/15m","1/XL/WR"],["18/15o","18/1Pp"]]);var p=l.parentNode.parentNode.parentNode.parentNode.id=="oC"?0:1;var clk;if(arguments.length==3){if(t==1){f=0}if(t==2&&!zIos(l.href)){f=3}clk=u[t][f][p]}else{var c=l.parentNode.parentNode.className;var t=c=="obE"?0:(c=="obS"?1:(c=="obO"?2:-1));var f=t==0?2:(t==1?0:(t==2&&zIos(l.href)?2:(t==2&&!zIos(l.href)?3:-1)));clk=u[t][f][p]}if(!clk)clk="18/15p";zT(l,clk)}function zIos(u){var r=(u.indexOf("&zu=")>0&&(u.substr(u.indexOf("&zu=")).indexOf("about.com")>0)||u.indexOf("http://")<0||u.indexOf("about.com")>0)?false:true;return r}</script><link rel="stylesheet" href="http://z.about.com/7/dc/rdb.css" type="text/css" media="all"><!--[if lt IE 8]><link rel="stylesheet" href="http://z.about.com/6/dc/rdie.css" type="text/css" media="all"><![endif]--><link rel="stylesheet" href="http://z.about.com/6/dc/rdp.css" type="text/css" media="print"><script type="text/javascript" src="http://z.about.com/6/js/rd.js"></script><script type="text/javascript">zOBT=" Ads"</script><meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" l gen true for "http://delphi.about.com" r (nz 1 vz 1 lz 1 oz 1 cz 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://delphi.about.com" r (n 0 s 0 v 0 l 0))'> </head><body id="tt2" class="gt2"><script language="JavaScript">
<!--
xd=0;zap="";zAth='';zAthG='3522';zTt='2';zir='';zBTS=0;zBT=1;zSt='31';zGz=''
ch='compute';gs='delphi';xg="Delphi Programming";zcs=''
zFDT='0'
zFST='0'
zOr='95EGSc2520kA0n6P';zTbO=zRQO=1;zp0=zp1=zp2=zp3=zfs=0;zDc=1;if(ch=='health')zGtKw=1;
zSm=zSu=zhc=zpb=zgs=zdn='';zFS='95E20950210900201';zFD='95E20950210900201'
zDO=zis=1;zpid=zi=zRf=ztp=zpo=0;zdx=20;zfx=100;zJs=13;
zi=1;zz=';72890=2-1-1299;272890=2-1-1299;336280=2-1-1299;2336280=2-1-1299;336155=2-1-12-1;2336155=2-1-12-1;93048=2-1-12-1;293048=2-1-12-1';zx='3-1-1399';zde=15;zdp=1440;zds=1440;zfp=0;zfs=66;zfd=100;zdd=20;zaX=new Array(11, new Array(100,504,8197,1,'336,210'),7, new Array(100,284,8197,9,'336,290'));zDc=1;;zDO=1;;zhc='';;zGTH=1;zGo=0;zG=17;zTac=2;zDot=3;
zObT="Delphi";zRad=5;var tp=" test"+(zBT?11:10);if(!this.zGCID)zGCID=tp
else zGCID+=tp;if(zBT>0){zOBR=1}
//-->
</script>
<script language="JavaScript" src="http://z.about.com/0/js/cj017x14t386.js"></script>
<script>zDO=0</script>
<script language="JavaScript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script> 
<noscript><meta http-equiv=refresh content="0;url=http://www.about.com/snf.htm?u=http://delphi.about.com/od/fullcodeprojects/a/computer-locker.htm%3Frd%3D1"></noscript>
<script type="text/javascript">z930=zpreC(930,48);if(thin){z930=0};z160=zpreC(160,600);z336=zpreC(336,280);z728=zpreC(728,90);z155=zpreC(336,155);zItw=160;</script><div id="abw"><script type="text/javascript">if(thin)gEI('abw').className='thin';</script><div id="abh"><form class="gsearch" name="sas" method="get" action="http://clk.about.com/" target="_top" alert="Please enter something to search for!"><fieldset class="main"><input id="sTxt" class="txt" name="terms" type="text" value="" validate="required"><input name="zi" type="hidden" value="18/1Yf/Zd"><input type="hidden" name="SUName" value="delphi"><input type="hidden" name="sdn" value="delphi"><input type="hidden" name="tt" value="2"><input type="hidden" name="bts" value="0"><button class="btn search" type="submit">Search</button></fieldset></form><div class="mast"><div class="logo"><a href="http://www.about.com/" zT="18/1Yb/Zv"><img src="http://z.about.com/d/lg/a1.gif" alt="About.com"></a></div><h2><a href="/" zT="18/1Yc/Zx" title="Delphi Programming">Delphi Programming</a></h2><script type="text/javascript">var h2=document.getElementsByTagName("h2")[0];if(h2.getElementsByTagName("a")[0].firstChild.nodeValue.length>28)h2.className="long";</script></div><ol class="crumbtrail"><li class="home"><a href="http://www.about.com/" zT="18/1Yd/Zz">Home</a></li><li><a href="http://www.about.com/compute/" zT="18/1Yd/Zz">Computing &amp; Technology</a></li><li><a href="http://delphi.about.com/" zT="18/1Yd/Zz">Delphi Programming</a></li></ol><div id="adL"><script type="text/javascript">if(z930==0 && z728>0){adunit('','',uy,ch,gs,728,90,'1','lb',1)}</script></div><ul id="actions"><li id="emailaction"><a href="/gi/pages/shareurl.htm?PG=http://delphi.about.com/od/fullcodeprojects/a/computer-locker.htm&zItl=Computer Locker" zT="18/1Z0/[3">Email</a></li><li id="printaction"><script>w(x2+zWl+'?p=1" zT="18/1[N" rel="nofollow">Print</a>')</script></li></ul></div><ul id="usrp" class="up"><li id="up0"><a href="http://delphi.about.com/" zT="18/1ZZ/aZ">Delphi Programming</a></li><li id="up1"><a href="http://delphi.about.com/od/beginners/u/delphi_basics.htm" zT="18/1ZZ">Basics</a></li><li id="up2"><a href="http://delphi.about.com/od/database/u/delphi_database_programming.htm" zT="18/1ZZ">Database Development</a></li><li id="up3"><a href="http://delphi.about.com/od/windowsshellapi/u/advanced_delphi.htm" zT="18/1ZZ">Advanced Delphi</a></li></ul><script type="text/javascript">if(z930>0){adunit('','',uy,ch,gs,930,48,'1','s',1)}</script><ul id="community"><li><form class="nl" name="subscription" action="http://clk.about.com/" method="get" alert="Please enter a valid email address."><label for="nTxt">Free Delphi Programming Newsletter!</label><input type="hidden" name="zi" value="18/1a9"><input type="hidden" name="surl" value="http://delphi.about.com/gi/pages/mmail.htm"><input type="hidden" name="eurl" value="http://delphi.about.com/gi/pages/mmail.htm"><input type="hidden" name="cmd_delphi" value="+:gs::delphi"><input type="hidden" name="gs" value="1"><input type="hidden" name="sdn" value="delphi"><input type="hidden" name="tt" value="2"><input type="hidden" name="bts" value="0"><span class="cntnr"><input id="nTxt" type="text" name="email" validate="email" value="Enter email address" validate="email" autoclear="1"></span><button type="submit" name="newsub" class="signup">Sign Up</button></form></li><li><a href="http://forums.about.com/n/pfx/forum.aspx?nav=messages&webtag=ab-delphi" zT="18/1Z1"><strong>Discuss</strong> in my Forum</a></li></ul><!--gc--><div id="title"><h1>Computer Locker</h1><script type="text/javascript">h1 = document.getElementById("title").getElementsByTagName("h1")[0];h1.innerHTML = widont(h1.innerHTML);</script><h2>Fancy Delphi Application Contest Entry #47 by Dagan Hoover</h2><p id="byline">By <a href="/mbiopage.htm" zT="18/1YF/Zf">Zarko Gajic</a>, About.com</p></div><div id="nav"><h4>Filed In:</h4><ol><li><a href="/od/fullcodeprojects" zT="18/1Ys/d2">Source Code Projects</a></li></ol></div><div id="abm" class="clear"><div id="abc"><div id="mimg" class="imgwrapper"><q><img src="http://z.about.com/d/delphi/1/G/k/e/fdac-computer-lock.gif" alt="Computer Locker - Fancy Delphi Application Contest Entry #47"></q><p class="caption">Computer Locker - Fancy Delphi Application Contest Entry #47</p></div><div id="spacer"></div><div id="sidebar"><script type="text/javascript">zSB(3,3)</script><script type="text/javascript">zob();if(zs<1){gEI('spacer').className='hide';gEI('sidebar').className='hide';}</script></div><div id="articlebody">		What happens with your machine when you need to move away from the computer for 10 or more minutes? How secure is your data? Can someone sit on your chair while you are at a coworkers office and play with your data?<p>Maybe you need a computer locking tool that is small and easy to use yet powerful enough to make sure your machine is locked when you need to go out for a break.<h3>Computer Locker</h3>When run the &quot;Computer Locker&quot; will ask you for a password that is then hashed for your safety. The locker will prevent a user from executing the Task Manager. Locker will also provide a way for a user to log off, restart or shut down the machine.<p>From a programmer point of interest the source code includes an Md5 hashing algoritham by using API calls from the ADVAPI32.DLL. <blockquote class="yes"><b>const</b><br />&nbsp;&nbsp;ADVAPI32 = 'advapi32.dll';<br />&nbsp;&nbsp;<b>function</b> CryptAcquireContext(phProv: PULONG; pszContainer: PAnsiChar; pszProvider: PAnsiChar; dwProvType: DWORD; dwFlags: DWORD): BOOL; stdcall; external ADVAPI32 name 'CryptAcquireContextA';<br />&nbsp;&nbsp;<b>function</b> CryptCreateHash(hProv: ULONG; Algid: ULONG; hKey: ULONG; dwFlags: DWORD; phHash: PULONG): BOOL; stdcall; <b>external</b> ADVAPI32 <b>name</b> 'CryptCreateHash';<br />&nbsp;&nbsp;<b>function</b> CryptHashData(hHash: ULONG; const pbData: PBYTE; dwDataLen: DWORD; dwFlags: DWORD): BOOL; stdcall; <b>external</b> ADVAPI32 <b>name</b> 'CryptHashData';<br />&nbsp;&nbsp;<b>function</b> CryptGetHashParam(hHash: ULONG; dwParam: DWORD; pbData: PBYTE; pdwDataLen: PDWORD; dwFlags: DWORD): BOOL; stdcall; <b>external</b> ADVAPI32 <b>name</b> 'CryptGetHashParam';<br />&nbsp;&nbsp;<b>function</b> CryptDestroyHash(hHash: ULONG): BOOL; stdcall; <b>external</b> ADVAPI32 <b>name</b> 'CryptDestroyHash';<br />&nbsp;&nbsp;<b>function</b> CryptReleaseContext(hProv: ULONG; dwFlags: DWORD): BOOL; stdcall; <b>external</b> ADVAPI32 name 'CryptReleaseContext';<br /><br /><b>function</b> MD5(<b>const</b> Input: <b>String</b>): <b>String</b>;<br />const<br />&nbsp;&nbsp;HP_HASHVAL = $0002;<br />&nbsp;&nbsp;PROV_RSA_FULL  = 1;<br />&nbsp;&nbsp;CRYPT_VERIFYCONTEXT = $F0000000;<br />&nbsp;&nbsp;CRYPT_MACHINE_KEYSET = $00000020;<br />

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -