96 lines
9.2 KiB
Plaintext
96 lines
9.2 KiB
Plaintext
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<meta name="generator" content="TempleOS V5.03">
|
||
|
<meta name="viewport" content="width=device-width">
|
||
|
<link rel="stylesheet" href="/style/templeos.css">
|
||
|
<script src="/script/templeos.js"></script>
|
||
|
<style type="text/css">
|
||
|
.cF0{color:#000000;background-color:#ffffff;}
|
||
|
.cF1{color:#0000aa;background-color:#ffffff;}
|
||
|
.cF2{color:#00aa00;background-color:#ffffff;}
|
||
|
.cF3{color:#00aaaa;background-color:#ffffff;}
|
||
|
.cF4{color:#aa0000;background-color:#ffffff;}
|
||
|
.cF5{color:#aa00aa;background-color:#ffffff;}
|
||
|
.cF6{color:#aa5500;background-color:#ffffff;}
|
||
|
.cF7{color:#aaaaaa;background-color:#ffffff;}
|
||
|
.cF8{color:#555555;background-color:#ffffff;}
|
||
|
.cF9{color:#5555ff;background-color:#ffffff;}
|
||
|
.cFA{color:#55ff55;background-color:#ffffff;}
|
||
|
.cFB{color:#55ffff;background-color:#ffffff;}
|
||
|
.cFC{color:#ff5555;background-color:#ffffff;}
|
||
|
.cFD{color:#ff55ff;background-color:#ffffff;}
|
||
|
.cFE{color:#ffff55;background-color:#ffffff;}
|
||
|
.cFF{color:#ffffff;background-color:#ffffff;}
|
||
|
</style>
|
||
|
</head>
|
||
|
<body>
|
||
|
<pre id="content">
|
||
|
<a name="l1"></a><span class=cF0>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>"Registry/Install Registration"</span><span class=cF0>
|
||
|
<a name="l2"></a>
|
||
|
<a name="l3"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>CInsReg</span><span class=cF0> </span><span class=cFB>ins_reg</span><span class=cF0>;
|
||
|
<a name="l4"></a></span><span class=cF5>MemSet</span><span class=cF0>(&</span><span class=cFB>ins_reg</span><span class=cF0>,0,</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CInsReg</span><span class=cF7>)</span><span class=cF0>);
|
||
|
<a name="l5"></a>
|
||
|
<a name="l6"></a></span><span class=cF5>DefineLstLoad</span><span class=cF0>(</span><span class=cF6>"ST_HOST_OSES"</span><span class=cF0>,</span><span class=cF6>"Other\0Native\0Linux\0Windows\0"</span><span class=cF0>);
|
||
|
<a name="l7"></a></span><span class=cF5>DefineLstLoad</span><span class=cF0>(</span><span class=cF6>"ST_HOST_VMS"</span><span class=cF0>,</span><span class=cF6>"Other\0Native\0VMware\0QEMU\0VirtualBox\0"</span><span class=cF0>);
|
||
|
<a name="l8"></a>
|
||
|
<a name="l9"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>RR_UNREGISTER</span><span class=cF0> -1
|
||
|
<a name="l10"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>RR_REGISTER</span><span class=cF0> 0
|
||
|
<a name="l11"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>RR_REREGISTER</span><span class=cF0> 1
|
||
|
<a name="l12"></a>
|
||
|
<a name="l13"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>InsReg</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> drv_let=0,</span><span class=cF9>I64</span><span class=cF0> action=</span><span class=cF3>RR_REGISTER</span><span class=cF0>)
|
||
|
<a name="l14"></a>{</span><span class=cF2>//Register this install in local </span><a href="/Wb/Home/Registry.HC.HTML#l1"><span class=cF4>Registry.HC</span></a><span class=cF2> file.</span><span class=cF0>
|
||
|
<a name="l15"></a> </span><span class=cF9>CInsReg</span><span class=cF0> r;
|
||
|
<a name="l16"></a> </span><span class=cF9>I64</span><span class=cF0> old_drv_let;
|
||
|
<a name="l17"></a> </span><span class=cF1>Bool</span><span class=cF0> res=</span><span class=cF3>FALSE</span><span class=cF0>;
|
||
|
<a name="l18"></a>
|
||
|
<a name="l19"></a> </span><span class=cF1>if</span><span class=cF0> (action==</span><span class=cF3>RR_UNREGISTER</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l20"></a> </span><span class=cF5>MemSet</span><span class=cF0>(&r,0,</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CInsReg</span><span class=cF7>)</span><span class=cF0>);
|
||
|
<a name="l21"></a> res=</span><span class=cF3>TRUE</span><span class=cF0>;
|
||
|
<a name="l22"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (action==</span><span class=cF3>RR_REREGISTER</span><span class=cF0> || !</span><span class=cFB>ins_reg</span><span class=cF0>.registered) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l23"></a> </span><span class=cF5>MemCpy</span><span class=cF0>(&r,&</span><span class=cFB>ins_reg</span><span class=cF0>,</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CInsReg</span><span class=cF7>)</span><span class=cF0>);
|
||
|
<a name="l24"></a> r.registered=</span><span class=cF3>TRUE</span><span class=cF0>;
|
||
|
<a name="l25"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>PopUpForm</span><span class=cF7>(</span><span class=cF0>&r</span><span class=cF7>)</span><span class=cF0>)
|
||
|
<a name="l26"></a> res=</span><span class=cF3>TRUE</span><span class=cF0>;
|
||
|
<a name="l27"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l28"></a>
|
||
|
<a name="l29"></a> </span><span class=cF1>if</span><span class=cF0> (res) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l30"></a> old_drv_let=*</span><span class=cFB>sys_registry_doc</span><span class=cF0>->filename.name;
|
||
|
<a name="l31"></a> </span><span class=cF1>if</span><span class=cF0> (drv_let)
|
||
|
<a name="l32"></a> *</span><span class=cFB>sys_registry_doc</span><span class=cF0>->filename.name=drv_let;
|
||
|
<a name="l33"></a> </span><span class=cF5>RegWrite</span><span class=cF0>(</span><span class=cF6>"Adam/InsReg"</span><span class=cF0>,
|
||
|
<a name="l34"></a> </span><span class=cF6>"#help_index \"Registry/Install Registration\"\n"</span><span class=cF0>
|
||
|
<a name="l35"></a> </span><span class=cF6>"MemSet(&ins_reg,0,sizeof(CInsReg));\n"</span><span class=cF0>
|
||
|
<a name="l36"></a> </span><span class=cF6>"ins_reg.registered=%d;\n"</span><span class=cF0>
|
||
|
<a name="l37"></a> </span><span class=cF6>"ins_reg.host_os=%d;\n"</span><span class=cF0>
|
||
|
<a name="l38"></a> </span><span class=cF6>"ins_reg.host_vm=%d;\n"</span><span class=cF0>
|
||
|
<a name="l39"></a> </span><span class=cF6>"\n#define INS_REG_PERSONAL_INITIALS \"%s\"\n"</span><span class=cF0>
|
||
|
<a name="l40"></a> </span><span class=cF6>"StrCpy(ins_reg.initials,\"%s\");\n"</span><span class=cF0>
|
||
|
<a name="l41"></a> </span><span class=cF6>"HashPublic(\"INS_REG_PERSONAL_INITIALS\",HTT_DEFINE_STR);\n"</span><span class=cF0>
|
||
|
<a name="l42"></a> </span><span class=cF6>"\n#define INS_REG_MACHINE_NUM %d\n"</span><span class=cF0>
|
||
|
<a name="l43"></a> </span><span class=cF6>"ins_reg.machine_num=%d;\n"</span><span class=cF0>
|
||
|
<a name="l44"></a> </span><span class=cF6>"HashPublic(\"INS_REG_MACHINE_NUM\",HTT_DEFINE_STR);\n"</span><span class=cF0>
|
||
|
<a name="l45"></a> </span><span class=cF6>"\n\"InsReg:%%s:%%d\\n\","</span><span class=cF0>
|
||
|
<a name="l46"></a> </span><span class=cF6>"INS_REG_PERSONAL_INITIALS,INS_REG_MACHINE_NUM;\n"</span><span class=cF0>
|
||
|
<a name="l47"></a> </span><span class=cF6>"\n#help_index \"\"\n"</span><span class=cF0>
|
||
|
<a name="l48"></a> ,r.registered,r.host_os,r.host_vm,
|
||
|
<a name="l49"></a> r.initials,r.initials,r.machine_num,r.machine_num);
|
||
|
<a name="l50"></a> *</span><span class=cFB>sys_registry_doc</span><span class=cF0>->filename.name=old_drv_let;
|
||
|
<a name="l51"></a> </span><span class=cF5>RegExe</span><span class=cF0>(</span><span class=cF6>"Adam/InsReg"</span><span class=cF0>);
|
||
|
<a name="l52"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l53"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
||
|
<a name="l54"></a>}
|
||
|
<a name="l55"></a>
|
||
|
<a name="l56"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>InsRereg</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> drv_let=0)
|
||
|
<a name="l57"></a>{</span><span class=cF2>//Reregister this install in local </span><a href="/Wb/Home/Registry.HC.HTML#l1"><span class=cF4>Registry.HC</span></a><span class=cF2> file.</span><span class=cF0>
|
||
|
<a name="l58"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF5>InsReg</span><span class=cF0>(drv_let,</span><span class=cF3>RR_REREGISTER</span><span class=cF0>);
|
||
|
<a name="l59"></a>}
|
||
|
<a name="l60"></a>
|
||
|
<a name="l61"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>InsUnreg</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> drv_let=0)
|
||
|
<a name="l62"></a>{</span><span class=cF2>//Unregister this install in local </span><a href="/Wb/Home/Registry.HC.HTML#l1"><span class=cF4>Registry.HC</span></a><span class=cF2> file.</span><span class=cF0>
|
||
|
<a name="l63"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF5>InsReg</span><span class=cF0>(drv_let,</span><span class=cF3>RR_UNREGISTER</span><span class=cF0>);
|
||
|
<a name="l64"></a>}
|
||
|
</span></pre></body>
|
||
|
</html>
|