Fix instances of 'handle' typoed as 'hanlde'
Use std::wstring::c_str() to get null-terminated strings, not data()

The basic_string::data() method does not guarantee the result to be
null-terminated, and passing a non-null-terminated string where a
null-terminated string is expected (i.e. every Win32 API call here)
leads to all kinds of misfortune.