Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

713 lines
18 KiB

  1. //***************************************************************************
  2. //
  3. // VPGET.CPP
  4. //
  5. // Module: WBEM VIEW PROVIDER
  6. //
  7. // Purpose: Contains the GetObject implementation
  8. //
  9. // Copyright (c) 1998-2001 Microsoft Corporation, All Rights Reserved
  10. //
  11. //***************************************************************************
  12. #include "precomp.h"
  13. #include <provexpt.h>
  14. #include <provcoll.h>
  15. #include <provtempl.h>
  16. #include <provmt.h>
  17. #include <typeinfo.h>
  18. #include <process.h>
  19. #include <objbase.h>
  20. #include <stdio.h>
  21. #include <wbemidl.h>
  22. #include <provcont.h>
  23. #include <provevt.h>
  24. #include <provthrd.h>
  25. #include <provlog.h>
  26. #include <cominit.h>
  27. #include <dsgetdc.h>
  28. #include <lmcons.h>
  29. #include <instpath.h>
  30. #include <genlex.h>
  31. #include <sql_1.h>
  32. #include <objpath.h>
  33. #include <vpdefs.h>
  34. #include <vpquals.h>
  35. #include <vpserv.h>
  36. #include <vptasks.h>
  37. GetObjectTaskObject::GetObjectTaskObject(CViewProvServ *a_Provider,
  38. wchar_t *a_ObjectPath, ULONG a_Flag, IWbemObjectSink *a_NotificationHandler ,
  39. IWbemContext *pCtx, IWbemServices* a_Serv, CWbemServerWrap *a_ServerWrap)
  40. : WbemTaskObject (a_Provider, a_NotificationHandler, a_Flag, pCtx, a_Serv, a_ServerWrap),
  41. m_ObjectPath(NULL),
  42. m_ParsedObjectPath(NULL)
  43. {
  44. m_ObjectPath = UnicodeStringDuplicate(a_ObjectPath);
  45. }
  46. GetObjectTaskObject::~GetObjectTaskObject ()
  47. {
  48. BOOL t_Status = TRUE;
  49. if (m_bIndicate)
  50. {
  51. IWbemClassObject *t_NotifyStatus = NULL ;
  52. if (WBEM_NO_ERROR != m_ErrorObject.GetWbemStatus ())
  53. {
  54. t_Status = GetExtendedNotifyStatusObject ( &t_NotifyStatus ) ;
  55. }
  56. if ( t_Status )
  57. {
  58. m_NotificationHandler->SetStatus ( 0 , m_ErrorObject.GetWbemStatus () , 0 , t_NotifyStatus ) ;
  59. if (t_NotifyStatus)
  60. {
  61. t_NotifyStatus->Release () ;
  62. }
  63. }
  64. else
  65. {
  66. m_NotificationHandler->SetStatus ( 0 , m_ErrorObject.GetWbemStatus () , 0 , NULL ) ;
  67. }
  68. }
  69. if (m_ObjectPath != NULL)
  70. {
  71. delete [] m_ObjectPath;
  72. }
  73. if (NULL != m_ParsedObjectPath)
  74. {
  75. delete m_ParsedObjectPath;
  76. }
  77. if (m_StatusHandle != NULL)
  78. {
  79. CloseHandle(m_StatusHandle);
  80. }
  81. }
  82. BOOL GetObjectTaskObject::PerformGet(WbemProvErrorObject &a_ErrorObject, IWbemClassObject** pInst, const wchar_t* src, BOOL bAllprops)
  83. {
  84. m_StatusHandle = CreateEvent(NULL, TRUE, FALSE, NULL);
  85. if (m_StatusHandle == NULL)
  86. {
  87. a_ErrorObject.SetStatus ( WBEM_PROV_E_FAILED ) ;
  88. a_ErrorObject.SetWbemStatus ( WBEM_E_FAILED ) ;
  89. a_ErrorObject.SetMessage ( L"Failed to create an Synchronization object" ) ;
  90. return FALSE;
  91. }
  92. BOOL retVal = PerformQueries(a_ErrorObject, bAllprops);
  93. BOOL bWait = TRUE;
  94. while (retVal && bWait)
  95. {
  96. DWORD dwWait = WbemWaitForSingleObject(m_StatusHandle, VP_QUERY_TIMEOUT);
  97. switch(dwWait)
  98. {
  99. case WAIT_OBJECT_0:
  100. {
  101. retVal = ProcessResults(a_ErrorObject, pInst, src);
  102. bWait = FALSE;
  103. }
  104. break;
  105. case WAIT_TIMEOUT:
  106. {
  107. BOOL bCleanup = TRUE;
  108. if (m_ArrayLock.Lock())
  109. {
  110. if (m_ResultReceived)
  111. {
  112. m_ResultReceived = FALSE;
  113. bCleanup = FALSE;
  114. }
  115. m_ArrayLock.Unlock();
  116. }
  117. if (bCleanup)
  118. {
  119. CleanUpObjSinks(TRUE);
  120. a_ErrorObject.SetStatus ( WBEM_PROV_E_FAILED ) ;
  121. a_ErrorObject.SetWbemStatus ( WBEM_E_FAILED ) ;
  122. a_ErrorObject.SetMessage ( L"Wait on a sychronization object failed, or query timed out" ) ;
  123. retVal = FALSE;
  124. bWait = FALSE;
  125. }
  126. }
  127. break;
  128. default:
  129. {
  130. //Cancel outstanding requests and delete object sinks...
  131. //======================================================
  132. CleanUpObjSinks(TRUE);
  133. a_ErrorObject.SetStatus ( WBEM_PROV_E_FAILED ) ;
  134. a_ErrorObject.SetWbemStatus ( WBEM_E_FAILED ) ;
  135. a_ErrorObject.SetMessage ( L"Wait on a sychronization object failed" ) ;
  136. retVal = FALSE;
  137. bWait = FALSE;
  138. }
  139. }
  140. }
  141. return retVal;
  142. }
  143. BOOL GetObjectTaskObject::PerformQueries(WbemProvErrorObject &a_ErrorObject, BOOL bAllprops)
  144. {
  145. //need enough tokens to handle association work-around serverpath or dotpath or relpath
  146. SQL_LEVEL_1_TOKEN* tokArray = new SQL_LEVEL_1_TOKEN[(m_ParsedObjectPath->m_dwNumKeys) * 6];
  147. m_iQueriesAsked++;
  148. m_ObjSinkArray.SetSize(0, m_NSpaceArray.GetSize());
  149. BOOL bStatusSet = FALSE;
  150. //m_NSpaceArray size is 1 for associations
  151. for (int x = 0; x < m_NSpaceArray.GetSize(); x++)
  152. {
  153. BOOL bContinue = TRUE;
  154. DWORD dwToks = 0;
  155. BOOL bFirst = TRUE;
  156. for (int i = 0; i < m_ParsedObjectPath->m_dwNumKeys; i++)
  157. {
  158. CPropertyQualifierItem* propItem;
  159. BOOL bFoundKey = FALSE;
  160. if (m_ParsedObjectPath->m_paKeys[i]->m_pName != NULL)
  161. {
  162. bFoundKey = m_PropertyMap.Lookup(m_ParsedObjectPath->m_paKeys[i]->m_pName, propItem);
  163. }
  164. else if (m_ParsedObjectPath->m_dwNumKeys == 1)
  165. {
  166. POSITION pos = m_PropertyMap.GetStartPosition();
  167. while (pos)
  168. {
  169. CStringW itmName;
  170. m_PropertyMap.GetNextAssoc(pos, itmName, propItem);
  171. if (propItem->IsKey())
  172. {
  173. bFoundKey = TRUE;
  174. break;
  175. }
  176. }
  177. }
  178. if (bFoundKey)
  179. {
  180. if (!propItem->m_SrcPropertyNames[x].IsEmpty())
  181. {
  182. tokArray[dwToks].nTokenType = SQL_LEVEL_1_TOKEN::OP_EXPRESSION;
  183. tokArray[dwToks].nOperator = SQL_LEVEL_1_TOKEN::OP_EQUAL;
  184. tokArray[dwToks].pPropertyName = propItem->m_SrcPropertyNames[x].AllocSysString();
  185. if (m_bAssoc && (propItem->GetCimType() == CIM_REFERENCE))
  186. {
  187. bContinue = TransposeReference(propItem, m_ParsedObjectPath->m_paKeys[i]->m_vValue,
  188. &(tokArray[dwToks].vConstValue), FALSE, NULL);
  189. if (!bContinue)
  190. {
  191. break;
  192. }
  193. else
  194. {
  195. //add the extra tokens if neccessary
  196. //for the association work-around
  197. wchar_t *t_pChar = tokArray[dwToks].vConstValue.bstrVal;
  198. //must be \\server\namespace and not \\.\namespace or relpath
  199. if ( (*t_pChar == L'\\') && (*(t_pChar+1) == L'\\') && (*(t_pChar+2) != L'.') )
  200. {
  201. //add the dotted version
  202. tokArray[dwToks + 1] = tokArray[dwToks];
  203. dwToks++;
  204. t_pChar = tokArray[dwToks].vConstValue.bstrVal + 2;
  205. while (*t_pChar != L'\\')
  206. {
  207. t_pChar++;
  208. }
  209. --t_pChar;
  210. *t_pChar = L'.';
  211. --t_pChar;
  212. *t_pChar = L'\\';
  213. --t_pChar;
  214. *t_pChar = L'\\';
  215. BSTR t_strtmp = SysAllocString(t_pChar);
  216. VariantClear(&(tokArray[dwToks].vConstValue));
  217. VariantInit(&(tokArray[dwToks].vConstValue));
  218. tokArray[dwToks].vConstValue.vt = VT_BSTR;
  219. tokArray[dwToks].vConstValue.bstrVal = t_strtmp;
  220. dwToks++;
  221. tokArray[dwToks].nTokenType = SQL_LEVEL_1_TOKEN::TOKEN_OR;
  222. //add the relpath version
  223. tokArray[dwToks + 1] = tokArray[dwToks - 1];
  224. dwToks++;
  225. t_pChar = tokArray[dwToks].vConstValue.bstrVal + 4;
  226. while (*t_pChar != L':')
  227. {
  228. t_pChar++;
  229. }
  230. //exclude the ':'
  231. t_pChar++;
  232. t_strtmp = SysAllocString(t_pChar);
  233. VariantClear(&(tokArray[dwToks].vConstValue));
  234. VariantInit(&(tokArray[dwToks].vConstValue));
  235. tokArray[dwToks].vConstValue.vt = VT_BSTR;
  236. tokArray[dwToks].vConstValue.bstrVal = t_strtmp;
  237. dwToks++;
  238. tokArray[dwToks].nTokenType = SQL_LEVEL_1_TOKEN::TOKEN_OR;
  239. }
  240. }
  241. }
  242. else
  243. {
  244. VariantInit(&(tokArray[dwToks].vConstValue));
  245. if (FAILED(VariantCopy(&(tokArray[dwToks].vConstValue),
  246. &(m_ParsedObjectPath->m_paKeys[i]->m_vValue))))
  247. {
  248. throw Heap_Exception(Heap_Exception::HEAP_ERROR::E_ALLOCATION_ERROR);
  249. }
  250. }
  251. //after every key add an AND
  252. //except if this is the first key && there is no where clause
  253. dwToks++;
  254. if ((!bFirst) || (m_SourceArray[x]->GetRPNExpression()->nNumTokens != 0))
  255. {
  256. tokArray[dwToks++].nTokenType = SQL_LEVEL_1_TOKEN::TOKEN_AND;
  257. }
  258. bFirst = FALSE;
  259. }
  260. }
  261. }
  262. if (bContinue)
  263. {
  264. CStringW queryStr = GetStringFromRPN(m_SourceArray[x]->GetRPNExpression(), dwToks, tokArray, bAllprops);
  265. CObjectSinkResults * objSnk = new CObjectSinkResults(this, x);
  266. objSnk->AddRef();
  267. m_ObjSinkArray.SetAtGrow(x, objSnk);
  268. CWbemServerWrap** nsPtrs = m_NSpaceArray[x]->GetServerPtrs();
  269. for (int m = 0; m < m_NSpaceArray[x]->GetCount(); m++)
  270. {
  271. if (nsPtrs[m] != NULL)
  272. {
  273. CViewProvObjectSink* pSnk = new CViewProvObjectSink(objSnk, nsPtrs[m], m);
  274. pSnk->AddRef();
  275. BSTR queryBStr = queryStr.AllocSysString();
  276. BSTR queryLBStr = SysAllocString(WBEM_QUERY_LANGUAGE_SQL1);
  277. IWbemObjectSink* pQuerySink = pSnk;
  278. IWbemContext * t_pCtx = m_Ctx;
  279. if (nsPtrs[m]->IsRemote())
  280. {
  281. #if 0
  282. #if (VER_PRODUCTMAJORVERSION < 0x5)
  283. pQuerySink = pSnk->Associate();
  284. #endif
  285. #endif
  286. t_pCtx = NULL; //don't use context for remote calls
  287. }
  288. IWbemServices *ptmpServ = nsPtrs[m]->GetServerOrProxy();
  289. if (ptmpServ)
  290. {
  291. if ( pQuerySink )
  292. {
  293. HRESULT t_hr = ptmpServ->ExecQueryAsync(queryLBStr, queryBStr, 0, t_pCtx, pQuerySink);
  294. if ( FAILED(t_hr) && (HRESULT_FACILITY(t_hr) != FACILITY_ITF) && nsPtrs[m]->IsRemote())
  295. {
  296. if ( SUCCEEDED(UpdateConnection(&(nsPtrs[m]), &ptmpServ)) )
  297. {
  298. if (ptmpServ)
  299. {
  300. t_hr = ptmpServ->ExecQueryAsync(queryLBStr, queryBStr, 0, t_pCtx, pQuerySink);
  301. }
  302. }
  303. }
  304. if (SUCCEEDED(t_hr))
  305. {
  306. if (m_ArrayLock.Lock())
  307. {
  308. m_iQueriesAsked++;
  309. m_ArrayLock.Unlock();
  310. }
  311. else
  312. {
  313. pSnk->DisAssociate();
  314. }
  315. }
  316. else
  317. {
  318. pSnk->DisAssociate();
  319. }
  320. }
  321. else
  322. {
  323. pSnk->DisAssociate();
  324. }
  325. if (ptmpServ)
  326. {
  327. nsPtrs[m]->ReturnServerOrProxy(ptmpServ);
  328. }
  329. }
  330. else
  331. {
  332. pSnk->DisAssociate();
  333. }
  334. pSnk->Release();
  335. SysFreeString(queryBStr);
  336. SysFreeString(queryLBStr);
  337. }
  338. else
  339. {
  340. a_ErrorObject.SetStatus ( WBEM_PROV_E_INVALID_NAMESPACE ) ;
  341. a_ErrorObject.SetWbemStatus ( ( WBEMSTATUS ) m_NSpaceArray[x]->GetServerCreationError () ) ;
  342. a_ErrorObject.SetMessage ( L"Failed to send query, invalid or inaccessible namespace" ) ;
  343. bStatusSet = TRUE;
  344. }
  345. }
  346. }
  347. //clean up token array for next pass...
  348. for (int n = 0; n < dwToks; n++)
  349. {
  350. if (tokArray[n].nTokenType == SQL_LEVEL_1_TOKEN::OP_EXPRESSION)
  351. {
  352. VariantClear(&(tokArray[n].vConstValue));
  353. SysFreeString(tokArray[n].pPropertyName);
  354. tokArray[n].pPropertyName = NULL;
  355. }
  356. }
  357. }
  358. delete [] tokArray;
  359. if (m_ArrayLock.Lock())
  360. {
  361. m_iQueriesAsked--;
  362. if (m_iQueriesAsked != m_iQueriesAnswered)
  363. {
  364. //just in case this was triggerred while we had yet to ask some queries
  365. ResetEvent(m_StatusHandle);
  366. }
  367. else
  368. {
  369. //just in case this wasn't triggerred while we were asking queries
  370. SetEvent(m_StatusHandle);
  371. }
  372. m_ArrayLock.Unlock();
  373. }
  374. if (m_iQueriesAsked == 0)
  375. {
  376. for (int x = 0; x < m_ObjSinkArray.GetSize(); x++)
  377. {
  378. if (m_ObjSinkArray[x] != NULL)
  379. {
  380. m_ObjSinkArray[x]->Release();
  381. }
  382. }
  383. m_ObjSinkArray.RemoveAll();
  384. if ( ! bStatusSet )
  385. {
  386. a_ErrorObject.SetStatus ( WBEM_PROV_E_INVALID_CLASS ) ;
  387. a_ErrorObject.SetWbemStatus ( WBEM_E_FAILED ) ;
  388. a_ErrorObject.SetMessage ( L"Failed to send any queries, invalid namespaces" ) ;
  389. }
  390. return FALSE;
  391. }
  392. return TRUE;
  393. }
  394. BOOL GetObjectTaskObject::ProcessResults(WbemProvErrorObject &a_ErrorObject, IWbemClassObject** pInst, const wchar_t* src)
  395. {
  396. BOOL retVal = TRUE;
  397. int arrayIndex;
  398. int indexCnt = 0;
  399. for (int x = 0; retVal && (x < m_ObjSinkArray.GetSize()); x++)
  400. {
  401. if ((m_ObjSinkArray[x] != NULL) && m_ObjSinkArray[x]->IsSet())
  402. {
  403. if (SUCCEEDED(m_ObjSinkArray[x]->GetResult()))
  404. {
  405. DWORD dwCount = m_ObjSinkArray[x]->m_ObjArray.GetSize();
  406. if (0 < dwCount)
  407. {
  408. arrayIndex = x;
  409. indexCnt++;
  410. }
  411. }
  412. else
  413. {
  414. retVal = FALSE;
  415. a_ErrorObject.SetStatus ( WBEM_PROV_E_INVALID_CLASS ) ;
  416. a_ErrorObject.SetWbemStatus ( ( WBEMSTATUS ) m_ObjSinkArray[x]->GetResult() ) ;
  417. a_ErrorObject.SetMessage ( L"Object path and Class qualifiers resulted in a failed query." ) ;
  418. }
  419. }
  420. else
  421. {
  422. retVal = FALSE;
  423. a_ErrorObject.SetStatus ( WBEM_PROV_E_INVALID_CLASS ) ;
  424. a_ErrorObject.SetWbemStatus ( WBEM_E_FAILED ) ;
  425. a_ErrorObject.SetMessage ( L"Invalid source namespace path OR object path and Class qualifiers resulted in a failed query." ) ;
  426. }
  427. }
  428. if (retVal)
  429. {
  430. if (0 == indexCnt)
  431. {
  432. retVal = FALSE;
  433. a_ErrorObject.SetStatus ( WBEM_PROV_E_NOT_FOUND ) ;
  434. a_ErrorObject.SetWbemStatus ( WBEM_E_NOT_FOUND ) ;
  435. a_ErrorObject.SetMessage ( L"No source objects found to support view object path." ) ;
  436. CleanUpObjSinks();
  437. }
  438. else
  439. {
  440. if ((src != NULL) && (pInst != NULL))
  441. {
  442. DWORD *pdwIndices = NULL;
  443. DWORD dwIndxCount = GetIndexList(src, &pdwIndices);
  444. for (DWORD i = 0; i < dwIndxCount; i++)
  445. {
  446. if ((m_ObjSinkArray[pdwIndices[i]] != NULL) && SUCCEEDED(m_ObjSinkArray[pdwIndices[i]]->GetResult())
  447. && m_ObjSinkArray[pdwIndices[i]]->m_ObjArray.GetSize() == 1)
  448. {
  449. if (*pInst == NULL)
  450. {
  451. m_ObjSinkArray[pdwIndices[i]]->m_ObjArray[0]->GetWrappedObject()->AddRef();
  452. *pInst = m_ObjSinkArray[pdwIndices[i]]->m_ObjArray[0]->GetWrappedObject();
  453. }
  454. else
  455. {
  456. (*pInst)->Release();
  457. *pInst = NULL;
  458. }
  459. }
  460. }
  461. if (dwIndxCount)
  462. {
  463. delete [] pdwIndices;
  464. }
  465. }
  466. if (m_JoinOnArray.IsValid())
  467. {
  468. #ifdef VP_PERFORMANT_JOINS
  469. retVal = CreateAndIndicateJoinsPerf(a_ErrorObject, TRUE);
  470. #else
  471. retVal = CreateAndIndicateJoins(a_ErrorObject, TRUE);
  472. #endif
  473. if (!retVal && (a_ErrorObject.GetWbemStatus() == WBEM_NO_ERROR))
  474. {
  475. a_ErrorObject.SetStatus ( WBEM_PROV_E_NOT_FOUND ) ;
  476. a_ErrorObject.SetWbemStatus ( WBEM_E_NOT_FOUND ) ;
  477. a_ErrorObject.SetMessage ( L"Failed to map source instance(s) to view instance." ) ;
  478. }
  479. }
  480. else //union
  481. {
  482. if ( (1 < indexCnt) || (m_ObjSinkArray[arrayIndex]->m_ObjArray.GetSize() > 1) )
  483. {
  484. retVal = FALSE;
  485. a_ErrorObject.SetStatus ( WBEM_PROV_E_TOOMANYRESULTSRETURNED ) ;
  486. a_ErrorObject.SetWbemStatus ( WBEM_E_FAILED ) ;
  487. a_ErrorObject.SetMessage ( L"Ambiguous object path. Too many source instances returned." ) ;
  488. CleanUpObjSinks();
  489. }
  490. else
  491. {
  492. if ((src == NULL) && (pInst != NULL))
  493. {
  494. if ((m_ObjSinkArray[arrayIndex] != NULL) && SUCCEEDED(m_ObjSinkArray[arrayIndex]->GetResult())
  495. && m_ObjSinkArray[arrayIndex]->m_ObjArray.GetSize())
  496. {
  497. m_ObjSinkArray[arrayIndex]->m_ObjArray[0]->GetWrappedObject()->AddRef();
  498. *pInst = m_ObjSinkArray[arrayIndex]->m_ObjArray[0]->GetWrappedObject();
  499. }
  500. }
  501. retVal = CreateAndIndicateUnions(a_ErrorObject, arrayIndex);
  502. if (!retVal && (a_ErrorObject.GetWbemStatus() == WBEM_NO_ERROR))
  503. {
  504. a_ErrorObject.SetStatus ( WBEM_PROV_E_NOT_FOUND ) ;
  505. a_ErrorObject.SetWbemStatus ( WBEM_E_NOT_FOUND ) ;
  506. a_ErrorObject.SetMessage ( L"Failed to map source instance(s) to view instance." ) ;
  507. }
  508. }
  509. }
  510. if (!retVal && (pInst != NULL) && (*pInst != NULL))
  511. {
  512. (*pInst)->Release();
  513. *pInst = NULL;
  514. }
  515. }
  516. }
  517. else
  518. {
  519. CleanUpObjSinks();
  520. }
  521. return retVal;
  522. }
  523. BOOL GetObjectTaskObject::GetSourceObject(const wchar_t* src, IWbemClassObject** pInst, BOOL bAllprops)
  524. {
  525. //Have to test that object path is real and return
  526. //the IWbemClassObject for the source requested....
  527. //==================================================
  528. m_bIndicate = FALSE;
  529. CObjectPathParser objectPathParser;
  530. BOOL t_Status = ! objectPathParser.Parse ( m_ObjectPath , &m_ParsedObjectPath ) ;
  531. if ( t_Status )
  532. {
  533. t_Status = SetClass(m_ParsedObjectPath->m_pClass) ;
  534. if ( t_Status )
  535. {
  536. t_Status = ParseAndProcessClassQualifiers(m_ErrorObject, m_ParsedObjectPath);
  537. if (t_Status)
  538. {
  539. if (m_bAssoc)
  540. {
  541. t_Status = FALSE;
  542. }
  543. else
  544. {
  545. t_Status = PerformGet(m_ErrorObject, pInst, src, bAllprops);
  546. }
  547. }
  548. }
  549. }
  550. else
  551. {
  552. t_Status = FALSE ;
  553. }
  554. return t_Status ;
  555. }
  556. BOOL GetObjectTaskObject :: GetObject ()
  557. {
  558. DebugOut2(
  559. CViewProvServ::sm_debugLog->WriteFileAndLine (
  560. _T(__FILE__),__LINE__,
  561. _T("GetObjectTaskObject :: GetObject\r\n")
  562. ) ;
  563. )
  564. CObjectPathParser objectPathParser;
  565. BOOL t_Status = ! objectPathParser.Parse ( m_ObjectPath , &m_ParsedObjectPath ) ;
  566. if ( t_Status )
  567. {
  568. t_Status = SetClass(m_ParsedObjectPath->m_pClass) ;
  569. if ( t_Status )
  570. {
  571. t_Status = ParseAndProcessClassQualifiers(m_ErrorObject, m_ParsedObjectPath);
  572. if (t_Status)
  573. {
  574. t_Status = PerformGet(m_ErrorObject);
  575. }
  576. }
  577. else
  578. {
  579. m_ErrorObject.SetStatus ( WBEM_PROV_E_INVALID_CLASS ) ;
  580. m_ErrorObject.SetWbemStatus ( WBEM_E_FAILED ) ;
  581. m_ErrorObject.SetMessage ( L"Class definition not found" ) ;
  582. DebugOut2(
  583. CViewProvServ::sm_debugLog->WriteFileAndLine (
  584. _T(__FILE__),__LINE__,
  585. _T("GetObjectTaskObject :: GetObject:Class definition not found\r\n")
  586. ) ;
  587. )
  588. }
  589. }
  590. else
  591. {
  592. t_Status = FALSE ;
  593. m_ErrorObject.SetStatus ( WBEM_PROV_E_INVALID_PARAMETER ) ;
  594. m_ErrorObject.SetWbemStatus ( WBEM_E_INVALID_PARAMETER ) ;
  595. m_ErrorObject.SetMessage ( L"Unable to parse object path" ) ;
  596. DebugOut2(
  597. CViewProvServ::sm_debugLog->WriteW (
  598. L"GetObjectTaskObject :: GetObject:Unable to parse object path %s\r\n",
  599. m_ObjectPath
  600. ) ;
  601. )
  602. }
  603. DebugOut2(
  604. CViewProvServ::sm_debugLog->WriteFileAndLine (
  605. _T(__FILE__),__LINE__,
  606. _T("leaving GetObjectTaskObject :: GetObject with %lx\r\n"),
  607. t_Status
  608. ) ;
  609. )
  610. return t_Status ;
  611. }