From 288cc74d77fd80e40a442344d9d0ce00162c1fb4 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 29 Aug 2012 13:01:53 +0100 Subject: New API: guestfs_hivex_value_utf8 A convenience function that reads a value from the registry and returns it as UTF-8. --- generator/generator_actions.ml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'generator') diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml index 6bcd0533..62903338 100644 --- a/generator/generator_actions.ml +++ b/generator/generator_actions.ml @@ -2224,6 +2224,22 @@ List the files in C (relative to the root directory, there is no cwd). The '.' and '..' entries are not returned, but hidden files are shown." }; + { defaults with + name = "hivex_value_utf8"; + style = RString "databuf", [Int64 "valueh"], []; + optional = Some "hivex"; + shortdesc = "return the data field from the (key, datatype, data) tuple"; + longdesc = "\ +This calls C (which returns the +data field from a hivex value tuple). It then assumes that +the field is a UTF-16LE string and converts the result to +UTF-8 (or if this is not possible, it returns an error). + +This is useful for reading strings out of the Windows registry. +However it is not foolproof because the registry is not +strongly-typed and fields can contain arbitrary or unexpected +data." }; + ] (* daemon_functions are any functions which cause some action @@ -9612,7 +9628,9 @@ This is a wrapper around the L call of the same name." }; longdesc = "\ Return the data field of a (key, datatype, data) tuple. -This is a wrapper around the L call of the same name." }; +This is a wrapper around the L call of the same name. + +See also: C." }; { defaults with name = "hivex_commit"; -- cgit