예제 #1
0
echo "\nValues:\n";
print_r(reg_enum_value($mainKey));
for ($i = 0; $value = reg_enum_value($mainKey, $i); $i++) {
    echo "\t{$value}=" . reg_get_value($mainKey, $value) . "\n";
}
reg_close_key($mainKey);
/* Res exemple */
$file = realpath('test_resourceDll.dll');
if (empty($file)) {
    err('The res exemple need a file !');
}
res_set($file, 'A_TYPE', 'A_RC_NAME', 'The time: ' . date('d-m-Y h:i'));
echo "Res Stream read: " . file_get_contents('res://' . $file . '/A_TYPE/A_RC_NAME') . "\n\n";
$h = res_open($file);
if (!$h) {
    err("can't open " . $file);
}
echo "Res list of '{$file}': \n";
$list = res_list_type($h, true);
if ($list === FALSE) {
    err("Can't list type");
}
for ($i = 0; $i < count($list); $i++) {
    echo $list[$i] . "\n";
    $res = res_list($h, $list[$i]);
    for ($j = 0; $j < count($res); $j++) {
        echo "\t" . $res[$j] . "\n";
    }
}
echo "Res get: " . res_get($h, 'A_TYPE', 'A_RC_NAME') . "\n\n";
res_close($h);
예제 #2
0
function display_list($name)
{
    $exe = ".\\{$name}.exe";
    check_exe($exe);
    $h = res_open($exe);
    if (!$h) {
        err("can't open '{$exe}'");
    }
    echo "Res list of '{$exe}': \n";
    $list = res_list_type($h, true);
    if ($list === FALSE) {
        err("Can't list type");
    }
    for ($i = 0; $i < count($list); $i++) {
        echo $list[$i] . "\n";
        $res = res_list($h, $list[$i]);
        for ($j = 0; $j < count($res); $j++) {
            echo "\t" . $res[$j] . "\n";
        }
    }
    res_close($h);
}