On 24.06.09 00:05:05, Maurice Kalinowski wrote:
> Andreas Pakulat wrote:
> >
> > Why is this not in svn? Are there cases where it does work? 
> Yes actually it works on most platforms. Basically it seems to be 
> related to either vista, 64bit or using vs2008, maybe even some 
> combination. I do have 64bit vista with msvc2005 on my desktop machine, 
> there it works as well. Using Windows 7 64bit , vs2008 hangs though...
> 
> Just grep for "ConnectServer(), wmi, hang" on your favorite search engine.

Ok, as I'm going to reference kdevelop4/win32 in the next release
announcement I'm re-posting the patch in a form that can actually be
used to easily apply against trunk with windows patch (which doesn't
like unix lineedings).

Andreas
 
-- 
You will never know hunger.
Index: solid/solid/backends/wmi/wmiquery.cpp
===================================================================
--- solid/solid/backends/wmi/wmiquery.cpp	(Revision 975764)
+++ solid/solid/backends/wmi/wmiquery.cpp	(Arbeitskopie)
@@ -98,8 +98,9 @@
     }
     if( !m_failed )
     {
-        hres = pLoc->ConnectServer( _bstr_t(L"ROOT\\CIMV2"), NULL, NULL, 0, NULL, 0, 0, &pSvc );                              
-        if( FAILED(hres) )
+        //hres = pLoc->ConnectServer( _bstr_t(L"ROOT\\CIMV2"), NULL, NULL, 0, NULL, 0, 0, &pSvc );                              
+        //if( FAILED(hres) )
+		if(true)
         {
             qCritical() << "Could not connect. Error code = " << hres << endl;
             pLoc->Release();
@@ -146,6 +147,9 @@
 {
     ItemList retList;
     
+	if( m_failed )
+		return retList;
+	
     HRESULT hres;
     hres = pSvc->ExecQuery( bstr_t("WQL"), bstr_t( qPrintable( wql ) ),
                 WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY, NULL, &pEnumerator);
_______________________________________________
Kde-windows mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-windows

Reply via email to