I've never tried use the VS GUI to compile a XS DLL since VS doesn't know what xsubpp is, plus there are many macros that are defined at the cmd line. You can compile on the command line then debug the DLL in the VS GUI. In the makefile.pl put "XSOPT => ' -nolinenumbers '," in the %config EUMM hash so you see the original C file in the debugger and not the XS file which isn't valid C code.
On second thought, you are not using XS and are not making a DLL and have no makefile, you are embedding the Perl Interp. Choice 1, switch the project in the VS GUI from UNICODE mode to MBCS mode . See
http://www.d3dcoder.net/Data/Book2/Book2Setup.pdf#5
Choice 2, is to manually define a PROCESSENTRY32A that MS never created. From my around 2003 platform sdk.
typedef struct tagPROCESSENTRY32W
{
DWORD dwSize;
DWORD cntUsage;
DWORD th32ProcessID; // this process
ULONG_PTR th32DefaultHeapID;
DWORD th32ModuleID; // associated exe
DWORD cntThreads;
DWORD th32ParentProcessID; // this process's parent process
LONG pcPriClassBase; // Base priority of process's thre
+ads
DWORD dwFlags;
WCHAR szExeFile[MAX_PATH]; // Path
} PROCESSENTRY32W;
typedef PROCESSENTRY32W * PPROCESSENTRY32W;
typedef PROCESSENTRY32W * LPPROCESSENTRY32W;
.........................
typedef struct tagPROCESSENTRY32
{
DWORD dwSize;
DWORD cntUsage;
DWORD th32ProcessID; // this process
ULONG_PTR th32DefaultHeapID;
DWORD th32ModuleID; // associated exe
DWORD cntThreads;
DWORD th32ParentProcessID; // this process's parent process
LONG pcPriClassBase; // Base priority of process's thre
+ads
DWORD dwFlags;
CHAR szExeFile[MAX_PATH]; // Path
} PROCESSENTRY32;
typedef PROCESSENTRY32 * PPROCESSENTRY32;
typedef PROCESSENTRY32 * LPPROCESSENTRY32;
#ifdef UNICODE
#define Process32First Process32FirstW
#define Process32Next Process32NextW
#define PROCESSENTRY32 PROCESSENTRY32W
#define PPROCESSENTRY32 PPROCESSENTRY32W
#define LPPROCESSENTRY32 LPPROCESSENTRY32W
#endif // !UNICODE
Choice 3 is to undef those last 3 lines and use the A postfix functions. Choice 4, if you HAVE to have use the wide APIs, and pass unicode into Perl language, that is a completely different topic, I suggest doing exactly what is done here
https://github.com/jandubois/win32/blob/841409b37dea45266c2afb68919d80c4e5dea657/Win32.xs#L174 for converting UTF16 into "Perl Unicode".
You can also rethink your design and make a XS module instead of embedding Perl into your own application. There has to be some Perl language code you want to run right?