Redirect GetWindowLong and SetWindowLong to their W equivalents.

This is necessary because Windows otherwise silently converts certain text parameters for window procedures to ANSI (see http://blogs.msdn.com/b/oldnewthing/archive/2003/12/01/55900.aspx).

Needed for th135.
Rename json_object_get_numkey() to json_object_numkey_get().

... wow, what the hell was I thinking when I named that function. Once you take a look at the function I'm going to add, you'll notice the confusion. json_containertype(_keytype)_get(_returntype) seems like a reasonable naming convention, so let's stick with that.
Cleanup.
Correctly determine the size of patched Win32 dialog items, once and for all.

In the end, the correct way ended up involving a healthy dose of RTFM and the use of an undocumented Windows function (which we copy-paste from Wine, just to be safe). Hooray.
strings_vsprintf(): Rewrite to work independently of string encoding.

Necessary to do this with ascii.anm... and less malloc() is always a good thing.
Replace magic numbers that imply 32-bit pointers with macros.

This will by far not be everything we'll need for 16-bit (PC-98) and 64-bit (the future) compatibility, but it's better than what we had before.
GetModuleFileNameU(): Return the required length if NULL is passed.

Finally, we have the "GetCurrentDirectory functionality" the original function unfortunately lacks.
Describe the extended functionality of certain win32_utf8 functions in the readme file.
Refactor the main DLL injection function to match current coding standards.

Yup, finally got around to clean up this copy-pasta. Less redundancy, less fixed-size string buffers, and finally got rid of the last prominent usage of UTF-16 in thcrap.
Add json_object_hexkey_get().

Oh, if we just hadn't decided on JSON, but some other nonexistant widespread standard format that allowed first-class hexadecimal keys.
Introduce a "Rx" syntax for hexadecimal addresses relative to the game's base address.

First half of #3. A lot cleaner than what I originally had in mind.