From 39a14ab66bada56bb3c03d9ffff76b3a0d7e6c82 Mon Sep 17 00:00:00 2001 From: "SND\\kernelnet_cp" Date: Fri, 12 Nov 2010 16:03:03 +0000 Subject: [PATCH] [[+] added: windbg snippet displaying list of export for module [!] updated: loadUnicodeStr routine returns unicode string ( instead of ansi string ) git-svn-id: https://pykd.svn.codeplex.com/svn@57434 9b283d60-5439-405e-af05-b73fd8c4d996 --- pykd/dbgmem.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/pykd/dbgmem.cpp b/pykd/dbgmem.cpp index 1657383..0c657ff 100644 --- a/pykd/dbgmem.cpp +++ b/pykd/dbgmem.cpp @@ -230,17 +230,8 @@ loadUnicodeStr( ULONG64 address ) if ( !loadMemory( buffer, str, length ) ) break; - ansiStr = new char [ length/2 ]; - - WideCharToMultiByte( CP_ACP, 0, str, length/2, ansiStr, length/2, NULL, NULL ); - - std::string strVal ( ansiStr, length/2 ); - - delete[] str; - delete[] ansiStr; - - return boost::python::object( strVal ); - + boost::python::object( std::wstring(str) ); + } while( FALSE ); if ( str )