关于WCHAR* 和char* 的转换有关问题,希望各位帮个忙指点一下,多谢

关于WCHAR* 和char* 的转换问题,希望各位帮个忙指点一下,谢谢
在编译的时候遇到了这个难题,下面是我的代码:望高人多多指教..........

#include "stdafx.h"
#include<stdio.h>
#include<windows.h>
#include   <tlhelp32.h>
#include <stdlib.h>
#include "defines.h"
int __cdecl Kill_process_main(){

char * proname={"chrome.exe"};
char p[260];

int i;
HANDLE   hSnapshot;

hSnapshot=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0); //进程快照 
PROCESSENTRY32 pe;
pe.dwSize=sizeof(PROCESSENTRY32);

std::string szDst;


/*  char *orig 
    size_t origsize = strlen(orig) + 1; 
    const size_t newsize = 100; 
    size_t convertedChars = 0; 
    wchar_t wcstring[newsize]; 
    mbstowcs_s(&convertedChars, wcstring, origsize, orig, _TRUNCATE); 
    wcscat_s(wcstring, L\" (wchar_t *)\"); 
    wcout << wcstring << endl; */
/*size_t origsize =strlen(p)+1;
const size_t newsize =300;
size_t convertedChars = 0;
 pe.szExeFile[newsize];
mbstowcs_s(&convertedChars, pe.szExeFile, origsize, p, _TRUNCATE);
//mbstowcs(&convertedChars, pe.szExeFile, origsize, p, _TRUNCATE);*/

//Process32First(hSnapshot,&pe);
for(i=0;i<=2;i++)
{
   strcpy(p,proname[0]);
   Process32First(hSnapshot,&pe);


    int nCompare;
       nCompare =WideCharToMultiByte(CP_ACP, NULL, pe.szExeFile, wcslen(pe.szExeFile), p, 260, 0, 0);
   //nCompare =MultiByteToWideChar(CP_ACP, NULL, p, strlen(p) + 1, pe.szExeFile, 260);*/

   do  
   { 

      
   if(strcmp( pe.szExeFile, p )
)  //比较 如果相等就是等于 0
    {  
     HANDLE hProcess;  
     hProcess=OpenProcess(PROCESS_ALL_ACCESS|PROCESS_TERMINATE,FALSE,pe.th32ProcessID);  
     if(hProcess)  
     {  
      TerminateProcess(hProcess,0);//关闭进程
     }  
    }  
   
   }    
   while(Process32Next(hSnapshot,&pe));
}
 CloseHandle(hSnapshot);  
 return 0;
}

  
这段代码在if(strcmp( pe.szExeFile, p ))会报错,说是不能WCHAR* 转换成char* ,上面我也用了WideCharToMultiByte函数,但是没有效果啊,并且试着用了mbstowcs_s函数,也是不起作用,szExeFile是定义在结构体里,如下:

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 threads
    DWORD   dwFlags;
    WCHAR   szExeFile[MAX_PATH];    // Path
} PROCESSENTRY32W;

当我写成strcmp((const char*) pe.szExeFile, p )时,就不会报错,但是不能接着执行
{  
     HANDLE hProcess;  
     hProcess=OpenProcess(PROCESS_ALL_ACCESS|PROCESS_TERMINATE,FALSE,pe.th32ProcessID);  
     if(hProcess)  
     {  
      TerminateProcess(hProcess,0);//关闭进程

很是郁闷,这个谁会?帮个忙,谢谢。我是新手,指点的话请详细点啊 ;谢谢各位大神!!!!就剩40分了,全部奉上......

------解决方案--------------------
strcmp( pe.szExeFile, p )
一个是char一个是wchar肯定不能比较。
------解决方案--------------------
The ANSI code pages can be different on different computers, or can be changed for a single computer, leading to data corruption. For the most consistent results, applications should use Unicode, such as UTF-8 (code page 65001) or UTF-16, instead of a specific code page, unless legacy standards or data formats prevent the use of Unicode. If use of Unicode is not possible, applications should tag the data stream with the appropriate encoding name when protocols allow it. HTML, XML, and HTTP files allow tagging, but text files do not.