(* This script generates language bindings and some documentation for
* hivex.
- *
+ *
* After editing this file, run it (./generator/generator.ml) to
* regenerate all the output files. 'make' will rerun this
* automatically when necessary. Note that if you are using a separate
* build directory you must run generator.ml from the _source_
* directory.
- *
+ *
* IMPORTANT: This script should NOT print any warnings. If it prints
* warnings, you should treat them as errors.
- *
+ *
* OCaml tips: (1) In emacs, install tuareg-mode to display and format
* OCaml code correctly. 'vim' comes with a good OCaml editing mode by
* default. (2) Read the resources at http://ocaml-tutorial.org/
(* Hive types, from:
* https://secure.wikimedia.org/wikipedia/en/wiki/Windows_Registry#Keys_and_values
- *
+ *
* It's unfortunate that in our original C binding we strayed away from
* the names that Windows uses (eg. REG_SZ for strings). We include
* both our names and the Windows names.
=head1 SYNOPSIS
#include <hivex.h>
-
+
";
List.iter (
fun (shortname, style, _, _) ->
initialized = 1;
}
"
-
+
and generate_python_py () =
generate_header HashStyle LGPLv2plus;
(* All three GUIDs here confirmed in Windows 7 registries. In
* Windows <= 2003 these GUID fields seem to contain junk.
- *
+ *
* If you write zeroes to the GUID fields, load and unload in Win7
* REGEDIT, then Windows 7 writes some random GUIDs.
- *
+ *
* Also (on Win7) unknownguid1 == unknownguid2. unknownguid3 is
* different.
*)
* names are usually ASCII, that would be max length of names * 2).
* This is a historical maximum, so it can be greater than the
* current maximum name field.
- *
+ *
* The remaining fields are often non-zero, but the purpose is
* unknown.
- *
+ *
* In the hives we examined the other fields had values as
* follows:
* userflags: 0, 2, 0xa, 0xe
use Win::Hivex;
use Win::Hivex::Regedit qw(reg_import reg_export);
-
+
$h = Win::Hivex->open ('SOFTWARE', write => 1);
-
+
open FILE, "updates.reg";
reg_import (\*FILE, $h);
$h->commit (undef);
-
+
reg_export ($h, "\\Microsoft\\Windows NT\\CurrentVersion", \*OUTFILE,
prefix => "HKEY_LOCAL_MACHINE\\SOFTWARE");