Perl is always compiled in ANSI mode, all TCHAR and T____ things in C are ANSI/ASCII. You can not define _UNICODE. How did you determine that szExeFile is a WCHAR? Win32::Process::List compiled without errors or warnings for me. Win32::Process::List doesn't use the default typemap beyond SV *, ints, and char *s and doesn't include a custom typemap. If your modifying it for your use, post your full code. Are you sure your compiling this as C code? I have a suspicion your compiling it as C++ code which has stricter casting rules than C.