MessageBox(NULL,L"Error from CoInitialize",L"MallocInit- ERROR",MB_OK+MB_ICONSTOP);怎样让他编译通过?
谢谢.在先等

解决方案 »

  1.   

    MessageBox(NULL,"Error from CoInitialize","MallocInit- ERROR",MB_OK+MB_ICONSTOP)
      

  2.   

    MessageBox(NULL, L"Error from CoInitialize", L"MallocInit- ERROR", MB_OK+MB_ICONSTOP);
    MB_OK+MB_ICONSTOP -> MB_OK | MB_ICONSTOP
      

  3.   

    其实我是这个意思
    :本来MessageBox()的第2,3个参数应该是LPCTSTR,但如果要为WCHAR型的呢?
      

  4.   

    define UNICODE and _UNICODE and __UNICODEif you won't want to define the macro, please use MessageBoxW.or you can remove prefix 'L' from the second and third arguments