Fails to convert process name to wxString
Vadim Zeitlin
vadim at wxwidgets.org
Thu Nov 1 12:41:38 PDT 2007
On Thu, 1 Nov 2007 21:28:26 +0200 Eran Ifrah <eran.ifrah at gmail.com> wrote:
EI> Thanks, but this was my first attempt.
EI> I also tried various conversion classes, all seems to fail (wxConvUTF8 etc)
szExeFile field is CHAR even in Unicode build (and not TCHAR as usual).
As you probably use Unicode build (otherwise converting to wxString would
work) you indeed need to use wxString ctor with the conversion parameter.
However you should use wxConvLibc and not wxConvUTF8 because Windows never
uses wxConvUTF8 and if the string contains non-ASCII characters conversion
will fail (I have no idea why did you decide to use UTF-8...).
If it still fails, please be as kind as to indicate how exactly does it fail
(compilation error, the resulting string is empty, your CPU starts emitting
blue smoke, ... -- possibilities are really endless and only you know what
exactly goes on) and whether you use ANSI or Unicode wx build.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list