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.

42 lines
1.2 KiB

  1. #define CHECK_ERROR(cond, err) if (!(cond)) {pszErr=(err); goto done;}
  2. #define SAFERELEASE(p) if (p) {(p)->Release(); p = NULL;} else ;
  3. typedef enum tagXMLTAG
  4. {
  5. T_ROOT,
  6. T_NONE,
  7. T_ITEM,
  8. T_NAME,
  9. T_ICON,
  10. T_TYPE,
  11. T_BASE_URL
  12. } XMLTAG;
  13. HRESULT GetSourceXML(IXMLDocument **, TCHAR *);
  14. //void DumpElement(LPITEMIDLIST (CPidlMgr::*)( LPCTSTR ) , BOOL (CEnumIDList::*)(LPITEMIDLIST), IXMLElement *);
  15. void DumpElement(LPITEMIDLIST, CPidlMgr *, CEnumIDList *, IXMLElement *, XMLTAG);
  16. #define WALK_ELEMENT_COLLECTION(pCollection, pDispItem) \
  17. {\
  18. long length;\
  19. \
  20. if (SUCCEEDED(pChildren->get_length(&length)) && length > 0)\
  21. {\
  22. VARIANT vIndex, vEmpty;\
  23. vIndex.vt = VT_I4;\
  24. vEmpty.vt = VT_EMPTY;\
  25. \
  26. for (long i=0; i<length; i++)\
  27. {\
  28. vIndex.lVal = i;\
  29. IDispatch *pDispItem = NULL;\
  30. if (SUCCEEDED(pCollection->item(vIndex, vEmpty, &pDispItem)))\
  31. {
  32. #define END_WALK_ELEMENT_COLLECTION(pDispItem) \
  33. pDispItem->Release();\
  34. }\
  35. }\
  36. }\
  37. }