I solved this issue very differently due to the GCC compatibility requirement of my project. Its not pretty, but it uses the same binary code for both native 32-bit and wow64 environments. I haven't tested it with the MSVC compiler, but there shouldn't be any reason it wouldn't work.

Source code is available here: http://code.google.com/p/jnativehook...nicodeHelper.c