Re: [PATCH 5/7] reg: Add wchar/raw data conversion functions
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 2014-11-04 21:15, schrieb Jonathan Vollebregt:
+static LSTATUS wchar_get_data( const WCHAR *input, const DWORD type, + const WCHAR separator, DWORD *size_out, BYTE **out) +{ + DWORD i;
- switch (reg_type) + if (!input) + return data_default(type, size_out, out); + + switch (type) { case REG_SZ: + case REG_EXPAND_SZ: Another option to consider instead of the switch construct: Add conversion function pointers to struct type_rel. In this case you cannot use an anonymous structure. wchar_get_type would return a const struct type_rel *, and you can get the REG_* DWORD from it and call the data conversion function. The same can be done in the opposite direction.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJUWVgQAAoJEN0/YqbEcdMwfBUP/1IEsXZU+GuDO/fyjUGeRcke TBPRvRdgWpDtGc9Bm35dimRPXX8nw/Sk/2KLRRpqnWKQp76LuwYCkB7exWaJLWDP jxb/MP3QdWKkxxmkJDwerviB2ouoW6TWgatksCO+MOmxzQcwrJj2l88LefgQeD0Y w3T/kv5oWsKpIuZVJjtg4Jw8FNo1Q7PQI1bJaoa16t+Hb1KPUwn0U5/bVqD30B8H OqCEdv1jlqSYEMXP4yD3QXpapyDu8R//gCqcIdFml1MO9XdOR5sSnkdUqQipSNjZ 0UyBDtUVp/3KsI+cz4Uk3HqgaHnXFhESyG0CBMySM/we3ofWGvya5lOmPBP4+Tzo pI0xlzI2eapf9Pr9ROrz5qELdUTFc2ahF1EqVOvltLJxpVgBgNhMe7PaG11gJTsE FvK0BgAbvUOfRyiWI6MiyQcU6cwznXM19i0rGHj3hO1IgwcMZazn5weus3qrm+jM /vS2Ul6eUoB7kdWZgrKG2ehBLMLrQZRe0G4ra3B3AcCl7Ol05Sxm0F6Wntm0sZZg 2CTbyX3SwXeGSax4DH+MzFG3u31h6dNArtKLlKU0NzW9t7pGxW8L8QIFxQaMAvBS pzNwB1icU0Vc49ETx1fK6SmMZTuDU6mPRrEqxpdBfn+YGW6acnZMFq4qKe1rxgyy aXvXsCnlBCn90b0wefPI =S2A4 -----END PGP SIGNATURE-----
participants (1)
-
Stefan Dösinger