title: Cant get "Description" from Win32_OperatingSystem class
body: <p>I try to get Description from Win32_OperatingSystem, the main problem that i takes empty string.
  I dont understand why, when i try to take something else from Win32_OperatingSystem, with type string, i can get it.
  Can there be situation when Description is empty? Or its just bug in my code...?
  Code:</p>
  <pre><code>
  STDMETHODIMP CSystemInfo::GetOS(CString* SystemInfo )
  {
      HRESULT hres;
      CString tmp;
      hres = GetInfo( TEXT( &quot;Win32_OperatingSystem&quot; ), TEXT( &quot;Description&quot; ), &amp;tmp );
      if( FAILED( hres ) )
      {
          return E_FAIL;
      }
      SystemInfo-&gt;SetString( tmp.GetString() );
      return S_OK;
  }
  
  STDMETHODIMP CSystemInfo::GetInfo( CString className, CString propertyName, CString* info )
  {
      HRESULT hres;
      IWbemLocator* pLoc = NULL;
      IWbemServices* pSvc = NULL;
      IEnumWbemClassObject* pEnumerator = NULL;
      bool initialized = true;
  
      hres = CoInitialize( NULL );
      if( FAILED( hres ) )
      {
          return E_FAIL;
      }
  
      hres = CoInitializeSecurity(
          NULL,
          -1,                          // COM authentication
          NULL,                        // Authentication services
          NULL,                        // Reserved
          RPC_C_AUTHN_LEVEL_DEFAULT,   // Default authentication 
          RPC_C_IMP_LEVEL_IMPERSONATE, // Default Impersonation  
          NULL,                        // Authentication info
          EOAC_NONE,                   // Additional capabilities 
          NULL                         // Reserved
      );
  
      if( FAILED( hres ) &amp;&amp; hres != RPC_E_TOO_LATE )
      {
      }
  
      hres = CoCreateInstance(
          CLSID_WbemLocator,
          0,
          CLSCTX_INPROC_SERVER,
          IID_IWbemLocator, ( LPVOID* )&amp;pLoc );
  
      if( FAILED( hres ) )
      {
          return E_FAIL;
      }
  
      hres = pLoc-&gt;ConnectServer(
          bstr_t( L&quot;ROOT\\CIMV2&quot; ),  // Object path of WMI namespace
          NULL,                    // User name. NULL = current user
          NULL,                    // User password. NULL = current
          0,                       // Locale. NULL indicates current
          NULL,                    // Security flags.
          0,                       // Authority (for example, Kerberos)
          0,                       // Context object 
          &amp;pSvc                    // pointer to IWbemServices proxy
      );
  
      if( FAILED( hres ) )
      {
          return E_FAIL;
      }
  
      hres = CoSetProxyBlanket(
          pSvc,                        // Indicates the proxy to set
          RPC_C_AUTHN_WINNT,           // RPC_C_AUTHN_xxx
          RPC_C_AUTHZ_NONE,            // RPC_C_AUTHZ_xxx
          NULL,                        // Server principal name 
          RPC_C_AUTHN_LEVEL_CALL,      // RPC_C_AUTHN_LEVEL_xxx 
          RPC_C_IMP_LEVEL_IMPERSONATE, // RPC_C_IMP_LEVEL_xxx
          NULL,                        // client identity
          EOAC_NONE                    // proxy capabilities 
      );
  
      if( FAILED( hres ) )
      {
          return E_FAIL;
      }
  
  
      CString tmp = TEXT( &quot;SELECT * FROM &quot;);
      tmp += className.GetString();
      hres = pSvc-&gt;ExecQuery(
          bstr_t( &quot;WQL&quot; ),
          bstr_t(tmp.GetString()),
          WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY,
          NULL,
          &amp;pEnumerator );
  
      if( FAILED( hres ) )
      {
          return E_FAIL;
      }
  
      IWbemClassObject* pclsObj = NULL;
      ULONG uReturn = 0;
  
      while( pEnumerator )
      {
          HRESULT hr = pEnumerator-&gt;Next( WBEM_INFINITE, 1, &amp;pclsObj, &amp;uReturn );
  
          if( uReturn == 0 )
          {
              break;
          }
  
          VARIANT vtProp;
  
          hr = pclsObj-&gt;Get(propertyName.GetString(), 0, &amp;vtProp, 0, 0 );
          if( FAILED( hres ) )
          {
              return E_FAIL;
          }
          info-&gt;SetString( vtProp.bstrVal );
          VariantClear( &amp;vtProp );
          pclsObj-&gt;Release();
      }
      CoUninitialize();
      return S_OK;
  }
  
  </code></pre>
  <p>Thats how i calling my function</p>
  <pre><code>HRESULT hr;
      CoInitialize( NULL );
      CSystemInfo* cSystem = NULL;
      CLSID clsid;
      hr = CLSIDFromProgID( L&quot;Server.Inproc.1&quot; , &amp;clsid );
      if( FAILED( hr ) )
      {
          std::cout &lt;&lt; &quot;Cant get CLSID &quot; &lt;&lt; std::endl;
      }
      hr = CoCreateInstance( clsid,NULL, CLSCTX_INPROC_SERVER, IID_ISystemInfo, ( void** )&amp;cSystem );
      if( FAILED( hr ) )
      {
          std::cout &lt;&lt; &quot;Cant Create Instance&quot; &lt;&lt; std::endl;
      }
      CString tmp;
      hr = cSystem-&gt;GetOS( &amp;tmp );
      std::wcout &lt;&lt; &quot;OS Info: \t&quot; ;
      std::wcout &lt;&lt; tmp.GetString() &lt;&lt; std::endl;
  </code></pre>
  <p>Also i cant get description from Win32_DesktopMonitor.</p>