title: WMI Class is failed to initialize or it gives access violation
body: <p>Hi i am fetching hadrware information. IT build successfully but i am   facing two big issue.</p>
  
  <p>Issue 1 :
  When i select Project Properties/Configuration Properties/General/Character Set/Multi-byte Character Set In that case its going fail to give initialize COM Library. here is littlefor that</p>
  
  <pre><code>HRESULT hreshard;
  
          // Initialize COM.
          hreshard =  CoInitializeEx(0, COINIT_MULTITHREADED); 
          if (FAILED(hreshard))
          {
              AfxMessageBox(_T("Failed to initialize COM library. "));
              return false;                                                   // Program is going fail here and not able to give any information.
          }
  </code></pre>
  
  <p>Issue 2 :
  When i select Project Properties/Configuration Properties/General/Character Set/Unicode  Charater-Set In that case its crash in winmain.cpp file with unanhandled exception at 0x53a994ea (mfc100ud.dll) in TM_app.exe: 0xC0000005: Access violation reading location 0x00000000.</p>
  
  <p>Please give me suggestions.</p>