Source code of Windows XP (NT5)
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.

425 lines
13 KiB

  1. ////////////////////////////////////////////////////////////////
  2. //
  3. // General purpose debugging utilities
  4. //
  5. #include "StdAfx.h"
  6. #include "Debug.h"
  7. #include <afxpriv.h> // for MFC WM_ messages
  8. #ifdef _DEBUG
  9. #define new DEBUG_NEW
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. int CTraceEx::nIndent=-1; // current indent level
  13. #define _countof(array) (sizeof(array)/sizeof(array[0]))
  14. ////////////////
  15. // These functions are copied from dumpout.cpp in the MFC source,
  16. // with my modification to do indented TRACEing
  17. //
  18. void AFXAPI AfxDump(const CObject* pOb)
  19. {
  20. afxDump << pOb;
  21. }
  22. void AFX_CDECL AfxTrace(LPCTSTR lpszFormat, ...)
  23. {
  24. #ifdef _DEBUG // all AfxTrace output is controlled by afxTraceEnabled
  25. if (!afxTraceEnabled)
  26. return;
  27. #endif
  28. va_list args;
  29. va_start(args, lpszFormat);
  30. int nBuf;
  31. TCHAR szBuffer[512];
  32. nBuf = _vstprintf(szBuffer, lpszFormat, args);
  33. ASSERT(nBuf < _countof(szBuffer));
  34. // PD: Here are my added lines to do the indenting. Search
  35. // for newlines and insert prefix before each one. Yawn.
  36. //
  37. static BOOL bStartNewLine = TRUE;
  38. TCHAR* nextline;
  39. for (TCHAR* start = szBuffer; *start; start=nextline+1)
  40. {
  41. if (bStartNewLine)
  42. {
  43. if ((afxTraceFlags & traceMultiApp) && (AfxGetApp() != NULL))
  44. {
  45. afxDump << AfxGetApp()->m_pszExeName << _T(": ");
  46. }
  47. afxDump << CString(_T(' '),CTraceEx::nIndent*2);
  48. bStartNewLine = FALSE;
  49. }
  50. nextline = _tcschr(start, _T('\n'));
  51. if (nextline)
  52. {
  53. *nextline = 0; // terminate string at newline
  54. bStartNewLine = TRUE;
  55. }
  56. afxDump << start;
  57. if (!nextline)
  58. break;
  59. afxDump << _T("\n"); // the one I terminated
  60. }
  61. va_end(args);
  62. }
  63. //////////////////
  64. // Get window name in the form classname[HWND,title]
  65. // Searches all the parents for a window with a title.
  66. //
  67. CString sDbgName(CWnd* pWnd)
  68. {
  69. CString sTitle;
  70. HWND hwnd = pWnd->GetSafeHwnd();
  71. if (hwnd==NULL)
  72. {
  73. sTitle = _T("NULL");
  74. }
  75. else if (!::IsWindow(hwnd))
  76. {
  77. sTitle = _T("[bad window]");
  78. }
  79. else
  80. {
  81. sTitle = _T("[no title]");
  82. for (CWnd* pw = pWnd; pw; pw = pw->GetParent())
  83. {
  84. if (pw->GetWindowTextLength() > 0)
  85. {
  86. pw->GetWindowText(sTitle);
  87. break;
  88. }
  89. }
  90. }
  91. CString s;
  92. CString s2;
  93. USES_CONVERSION;
  94. s2 = pWnd ? A2T(pWnd->GetRuntimeClass()->m_lpszClassName) : _T("NULL");
  95. s.Format(_T("%s[0x%04x,\"%s\"]"), s2, hwnd, (LPCTSTR)sTitle);
  96. return s;
  97. }
  98. struct {
  99. UINT msg;
  100. LPCTSTR name;
  101. } MsgData[] = {
  102. { WM_CREATE,_T("WM_CREATE") },
  103. { WM_DESTROY,_T("WM_DESTROY") },
  104. { WM_MOVE,_T("WM_MOVE") },
  105. { WM_SIZE,_T("WM_SIZE") },
  106. { WM_ACTIVATE,_T("WM_ACTIVATE") },
  107. { WM_SETFOCUS,_T("WM_SETFOCUS") },
  108. { WM_KILLFOCUS,_T("WM_KILLFOCUS") },
  109. { WM_ENABLE,_T("WM_ENABLE") },
  110. { WM_SETREDRAW,_T("WM_SETREDRAW") },
  111. { WM_SETTEXT,_T("WM_SETTEXT") },
  112. { WM_GETTEXT,_T("WM_GETTEXT") },
  113. { WM_GETTEXTLENGTH,_T("WM_GETTEXTLENGTH") },
  114. { WM_PAINT,_T("WM_PAINT") },
  115. { WM_CLOSE,_T("WM_CLOSE") },
  116. { WM_QUERYENDSESSION,_T("WM_QUERYENDSESSION") },
  117. { WM_QUIT,_T("WM_QUIT") },
  118. { WM_QUERYOPEN,_T("WM_QUERYOPEN") },
  119. { WM_ERASEBKGND,_T("WM_ERASEBKGND") },
  120. { WM_SYSCOLORCHANGE,_T("WM_SYSCOLORCHANGE") },
  121. { WM_ENDSESSION,_T("WM_ENDSESSION") },
  122. { WM_SHOWWINDOW,_T("WM_SHOWWINDOW") },
  123. { WM_WININICHANGE,_T("WM_WININICHANGE") },
  124. { WM_SETTINGCHANGE,_T("WM_SETTINGCHANGE") },
  125. { WM_DEVMODECHANGE,_T("WM_DEVMODECHANGE") },
  126. { WM_ACTIVATEAPP,_T("WM_ACTIVATEAPP") },
  127. { WM_FONTCHANGE,_T("WM_FONTCHANGE") },
  128. { WM_TIMECHANGE,_T("WM_TIMECHANGE") },
  129. { WM_CANCELMODE,_T("WM_CANCELMODE") },
  130. { WM_SETCURSOR,_T("WM_SETCURSOR") },
  131. { WM_MOUSEACTIVATE,_T("WM_MOUSEACTIVATE") },
  132. { WM_CHILDACTIVATE,_T("WM_CHILDACTIVATE") },
  133. { WM_QUEUESYNC,_T("WM_QUEUESYNC") },
  134. { WM_GETMINMAXINFO,_T("WM_GETMINMAXINFO") },
  135. { WM_PAINTICON,_T("WM_PAINTICON") },
  136. { WM_ICONERASEBKGND,_T("WM_ICONERASEBKGND") },
  137. { WM_NEXTDLGCTL,_T("WM_NEXTDLGCTL") },
  138. { WM_SPOOLERSTATUS,_T("WM_SPOOLERSTATUS") },
  139. { WM_DRAWITEM,_T("WM_DRAWITEM") },
  140. { WM_MEASUREITEM,_T("WM_MEASUREITEM") },
  141. { WM_DELETEITEM,_T("WM_DELETEITEM") },
  142. { WM_VKEYTOITEM,_T("WM_VKEYTOITEM") },
  143. { WM_CHARTOITEM,_T("WM_CHARTOITEM") },
  144. { WM_SETFONT,_T("WM_SETFONT") },
  145. { WM_GETFONT,_T("WM_GETFONT") },
  146. { WM_SETHOTKEY,_T("WM_SETHOTKEY") },
  147. { WM_GETHOTKEY,_T("WM_GETHOTKEY") },
  148. { WM_QUERYDRAGICON,_T("WM_QUERYDRAGICON") },
  149. { WM_COMPAREITEM,_T("WM_COMPAREITEM") },
  150. { WM_COMPACTING,_T("WM_COMPACTING") },
  151. { WM_COMMNOTIFY,_T("WM_COMMNOTIFY") },
  152. { WM_WINDOWPOSCHANGING,_T("WM_WINDOWPOSCHANGING") },
  153. { WM_WINDOWPOSCHANGED,_T("WM_WINDOWPOSCHANGED") },
  154. { WM_POWER,_T("WM_POWER") },
  155. { WM_COPYDATA,_T("WM_COPYDATA") },
  156. { WM_CANCELJOURNAL,_T("WM_CANCELJOURNAL") },
  157. #if(WINVER >= 0x0400)
  158. { WM_NOTIFY,_T("WM_NOTIFY") },
  159. { WM_INPUTLANGCHANGEREQUEST,_T("WM_INPUTLANGCHANGEREQUEST") },
  160. { WM_INPUTLANGCHANGE,_T("WM_INPUTLANGCHANGE") },
  161. { WM_TCARD,_T("WM_TCARD") },
  162. { WM_HELP,_T("WM_HELP") },
  163. { WM_USERCHANGED,_T("WM_USERCHANGED") },
  164. { WM_NOTIFYFORMAT,_T("WM_NOTIFYFORMAT") },
  165. { WM_CONTEXTMENU,_T("WM_CONTEXTMENU") },
  166. { WM_STYLECHANGING,_T("WM_STYLECHANGING") },
  167. { WM_STYLECHANGED,_T("WM_STYLECHANGED") },
  168. { WM_DISPLAYCHANGE,_T("WM_DISPLAYCHANGE") },
  169. { WM_GETICON,_T("WM_GETICON") },
  170. { WM_SETICON,_T("WM_SETICON") },
  171. #endif /* WINVER >= 0x0400 */
  172. { WM_NCCREATE,_T("WM_NCCREATE") },
  173. { WM_NCDESTROY,_T("WM_NCDESTROY") },
  174. { WM_NCCALCSIZE,_T("WM_NCCALCSIZE") },
  175. { WM_NCHITTEST,_T("WM_NCHITTEST") },
  176. { WM_NCPAINT,_T("WM_NCPAINT") },
  177. { WM_NCACTIVATE,_T("WM_NCACTIVATE") },
  178. { WM_GETDLGCODE,_T("WM_GETDLGCODE") },
  179. { WM_NCMOUSEMOVE,_T("WM_NCMOUSEMOVE") },
  180. { WM_NCLBUTTONDOWN,_T("WM_NCLBUTTONDOWN") },
  181. { WM_NCLBUTTONUP,_T("WM_NCLBUTTONUP") },
  182. { WM_NCLBUTTONDBLCLK,_T("WM_NCLBUTTONDBLCLK") },
  183. { WM_NCRBUTTONDOWN,_T("WM_NCRBUTTONDOWN") },
  184. { WM_NCRBUTTONUP,_T("WM_NCRBUTTONUP") },
  185. { WM_NCRBUTTONDBLCLK,_T("WM_NCRBUTTONDBLCLK") },
  186. { WM_NCMBUTTONDOWN,_T("WM_NCMBUTTONDOWN") },
  187. { WM_NCMBUTTONUP,_T("WM_NCMBUTTONUP") },
  188. { WM_NCMBUTTONDBLCLK,_T("WM_NCMBUTTONDBLCLK") },
  189. { WM_KEYDOWN,_T("WM_KEYDOWN") },
  190. { WM_KEYUP,_T("WM_KEYUP") },
  191. { WM_CHAR,_T("WM_CHAR") },
  192. { WM_DEADCHAR,_T("WM_DEADCHAR") },
  193. { WM_SYSKEYDOWN,_T("WM_SYSKEYDOWN") },
  194. { WM_SYSKEYUP,_T("WM_SYSKEYUP") },
  195. { WM_SYSCHAR,_T("WM_SYSCHAR") },
  196. { WM_SYSDEADCHAR,_T("WM_SYSDEADCHAR") },
  197. { WM_KEYDOWN,_T("WM_KEYDOWN") },
  198. { WM_KEYUP,_T("WM_KEYUP") },
  199. { WM_CHAR,_T("WM_CHAR") },
  200. { WM_DEADCHAR,_T("WM_DEADCHAR") },
  201. { WM_SYSKEYDOWN,_T("WM_SYSKEYDOWN") },
  202. { WM_SYSKEYUP,_T("WM_SYSKEYUP") },
  203. { WM_SYSCHAR,_T("WM_SYSCHAR") },
  204. { WM_SYSDEADCHAR,_T("WM_SYSDEADCHAR") },
  205. #if(WINVER >= 0x0400)
  206. { WM_IME_STARTCOMPOSITION,_T("WM_IME_STARTCOMPOSITION") },
  207. { WM_IME_ENDCOMPOSITION,_T("WM_IME_ENDCOMPOSITION") },
  208. { WM_IME_COMPOSITION,_T("WM_IME_COMPOSITION") },
  209. { WM_IME_KEYLAST,_T("WM_IME_KEYLAST") },
  210. #endif
  211. { WM_INITDIALOG,_T("WM_INITDIALOG") },
  212. { WM_COMMAND,_T("WM_COMMAND") },
  213. { WM_SYSCOMMAND,_T("WM_SYSCOMMAND") },
  214. { WM_TIMER,_T("WM_TIMER") },
  215. { WM_HSCROLL,_T("WM_HSCROLL") },
  216. { WM_VSCROLL,_T("WM_VSCROLL") },
  217. { WM_INITMENU,_T("WM_INITMENU") },
  218. { WM_INITMENUPOPUP,_T("WM_INITMENUPOPUP") },
  219. { WM_MENUSELECT,_T("WM_MENUSELECT") },
  220. { WM_MENUCHAR,_T("WM_MENUCHAR") },
  221. { WM_ENTERIDLE,_T("WM_ENTERIDLE") },
  222. { WM_CTLCOLORMSGBOX,_T("WM_CTLCOLORMSGBOX") },
  223. { WM_CTLCOLOREDIT,_T("WM_CTLCOLOREDIT") },
  224. { WM_CTLCOLORLISTBOX,_T("WM_CTLCOLORLISTBOX") },
  225. { WM_CTLCOLORBTN,_T("WM_CTLCOLORBTN") },
  226. { WM_CTLCOLORDLG,_T("WM_CTLCOLORDLG") },
  227. { WM_CTLCOLORSCROLLBAR,_T("WM_CTLCOLORSCROLLBAR") },
  228. { WM_CTLCOLORSTATIC,_T("WM_CTLCOLORSTATIC") },
  229. { WM_MOUSEMOVE,_T("WM_MOUSEMOVE") },
  230. { WM_LBUTTONDOWN,_T("WM_LBUTTONDOWN") },
  231. { WM_LBUTTONUP,_T("WM_LBUTTONUP") },
  232. { WM_LBUTTONDBLCLK,_T("WM_LBUTTONDBLCLK") },
  233. { WM_RBUTTONDOWN,_T("WM_RBUTTONDOWN") },
  234. { WM_RBUTTONUP,_T("WM_RBUTTONUP") },
  235. { WM_RBUTTONDBLCLK,_T("WM_RBUTTONDBLCLK") },
  236. { WM_MBUTTONDOWN,_T("WM_MBUTTONDOWN") },
  237. { WM_MBUTTONUP,_T("WM_MBUTTONUP") },
  238. { WM_MBUTTONDBLCLK,_T("WM_MBUTTONDBLCLK") },
  239. { WM_MOUSEMOVE,_T("WM_MOUSEMOVE") },
  240. { WM_LBUTTONDOWN,_T("WM_LBUTTONDOWN") },
  241. { WM_LBUTTONUP,_T("WM_LBUTTONUP") },
  242. { WM_LBUTTONDBLCLK,_T("WM_LBUTTONDBLCLK") },
  243. { WM_RBUTTONDOWN,_T("WM_RBUTTONDOWN") },
  244. { WM_RBUTTONUP,_T("WM_RBUTTONUP") },
  245. { WM_RBUTTONDBLCLK,_T("WM_RBUTTONDBLCLK") },
  246. { WM_MBUTTONDOWN,_T("WM_MBUTTONDOWN") },
  247. { WM_MBUTTONUP,_T("WM_MBUTTONUP") },
  248. { WM_MBUTTONDBLCLK,_T("WM_MBUTTONDBLCLK") },
  249. { WM_PARENTNOTIFY,_T("WM_PARENTNOTIFY") },
  250. { WM_ENTERMENULOOP,_T("WM_ENTERMENULOOP") },
  251. { WM_EXITMENULOOP,_T("WM_EXITMENULOOP") },
  252. #if(WINVER >= 0x0400)
  253. { WM_NEXTMENU,_T("WM_NEXTMENU") },
  254. { WM_SIZING,_T("WM_SIZING") },
  255. { WM_CAPTURECHANGED,_T("WM_CAPTURECHANGED") },
  256. { WM_MOVING,_T("WM_MOVING") },
  257. { WM_POWERBROADCAST,_T("WM_POWERBROADCAST") },
  258. { WM_DEVICECHANGE,_T("WM_DEVICECHANGE") },
  259. { WM_IME_SETCONTEXT,_T("WM_IME_SETCONTEXT") },
  260. { WM_IME_NOTIFY,_T("WM_IME_NOTIFY") },
  261. { WM_IME_CONTROL,_T("WM_IME_CONTROL") },
  262. { WM_IME_COMPOSITIONFULL,_T("WM_IME_COMPOSITIONFULL") },
  263. { WM_IME_SELECT,_T("WM_IME_SELECT") },
  264. { WM_IME_CHAR,_T("WM_IME_CHAR") },
  265. { WM_IME_KEYDOWN,_T("WM_IME_KEYDOWN") },
  266. { WM_IME_KEYUP,_T("WM_IME_KEYUP") },
  267. #endif
  268. { WM_MDICREATE,_T("WM_MDICREATE") },
  269. { WM_MDIDESTROY,_T("WM_MDIDESTROY") },
  270. { WM_MDIACTIVATE,_T("WM_MDIACTIVATE") },
  271. { WM_MDIRESTORE,_T("WM_MDIRESTORE") },
  272. { WM_MDINEXT,_T("WM_MDINEXT") },
  273. { WM_MDIMAXIMIZE,_T("WM_MDIMAXIMIZE") },
  274. { WM_MDITILE,_T("WM_MDITILE") },
  275. { WM_MDICASCADE,_T("WM_MDICASCADE") },
  276. { WM_MDIICONARRANGE,_T("WM_MDIICONARRANGE") },
  277. { WM_MDIGETACTIVE,_T("WM_MDIGETACTIVE") },
  278. { WM_MDISETMENU,_T("WM_MDISETMENU") },
  279. { WM_ENTERSIZEMOVE,_T("WM_ENTERSIZEMOVE") },
  280. { WM_EXITSIZEMOVE,_T("WM_EXITSIZEMOVE") },
  281. { WM_DROPFILES,_T("WM_DROPFILES") },
  282. { WM_MDIREFRESHMENU,_T("WM_MDIREFRESHMENU") },
  283. { WM_CUT,_T("WM_CUT") },
  284. { WM_COPY,_T("WM_COPY") },
  285. { WM_PASTE,_T("WM_PASTE") },
  286. { WM_CLEAR,_T("WM_CLEAR") },
  287. { WM_UNDO,_T("WM_UNDO") },
  288. { WM_RENDERFORMAT,_T("WM_RENDERFORMAT") },
  289. { WM_RENDERALLFORMATS,_T("WM_RENDERALLFORMATS") },
  290. { WM_DESTROYCLIPBOARD,_T("WM_DESTROYCLIPBOARD") },
  291. { WM_DRAWCLIPBOARD,_T("WM_DRAWCLIPBOARD") },
  292. { WM_PAINTCLIPBOARD,_T("WM_PAINTCLIPBOARD") },
  293. { WM_VSCROLLCLIPBOARD,_T("WM_VSCROLLCLIPBOARD") },
  294. { WM_SIZECLIPBOARD,_T("WM_SIZECLIPBOARD") },
  295. { WM_ASKCBFORMATNAME,_T("WM_ASKCBFORMATNAME") },
  296. { WM_CHANGECBCHAIN,_T("WM_CHANGECBCHAIN") },
  297. { WM_HSCROLLCLIPBOARD,_T("WM_HSCROLLCLIPBOARD") },
  298. { WM_QUERYNEWPALETTE,_T("WM_QUERYNEWPALETTE") },
  299. { WM_PALETTEISCHANGING,_T("WM_PALETTEISCHANGING") },
  300. { WM_PALETTECHANGED,_T("WM_PALETTECHANGED") },
  301. { WM_HOTKEY,_T("WM_HOTKEY") },
  302. #if(WINVER >= 0x0400)
  303. { WM_PRINT,_T("WM_PRINT") },
  304. { WM_PRINTCLIENT,_T("WM_PRINTCLIENT") },
  305. #endif
  306. // Below are MFC messages
  307. { WM_QUERYAFXWNDPROC,_T("*WM_QUERYAFXWNDPROC") },
  308. { WM_SIZEPARENT,_T("*WM_SIZEPARENT") },
  309. { WM_SETMESSAGESTRING,_T("*WM_SETMESSAGESTRING") },
  310. { WM_IDLEUPDATECMDUI,_T("*WM_IDLEUPDATECMDUI") },
  311. { WM_INITIALUPDATE,_T("*WM_INITIALUPDATE") },
  312. { WM_COMMANDHELP,_T("*WM_COMMANDHELP") },
  313. { WM_HELPHITTEST,_T("*WM_HELPHITTEST") },
  314. { WM_EXITHELPMODE,_T("*WM_EXITHELPMODE") },
  315. { WM_RECALCPARENT,_T("*WM_RECALCPARENT") },
  316. { WM_SIZECHILD,_T("*WM_SIZECHILD") },
  317. { WM_KICKIDLE,_T("*WM_KICKIDLE") },
  318. { WM_QUERYCENTERWND,_T("*WM_QUERYCENTERWND") },
  319. { WM_DISABLEMODAL,_T("*WM_DISABLEMODAL") },
  320. { WM_FLOATSTATUS,_T("*WM_FLOATSTATUS") },
  321. { WM_ACTIVATETOPLEVEL,_T("*WM_ACTIVATETOPLEVEL") },
  322. { WM_QUERY3DCONTROLS,_T("*WM_QUERY3DCONTROLS") },
  323. { WM_SOCKET_NOTIFY,_T("*WM_SOCKET_NOTIFY") },
  324. { WM_SOCKET_DEAD,_T("*WM_SOCKET_DEAD") },
  325. { WM_POPMESSAGESTRING,_T("*WM_POPMESSAGESTRING") },
  326. { WM_OCC_LOADFROMSTREAM,_T("*WM_OCC_LOADFROMSTREAM") },
  327. { WM_OCC_LOADFROMSTORAGE,_T("*WM_OCC_LOADFROMSTORAGE") },
  328. { WM_OCC_INITNEW,_T("*WM_OCC_INITNEW") },
  329. { WM_QUEUE_SENTINEL,_T("*WM_QUEUE_SENTINEL") },
  330. { 0,NULL }
  331. };
  332. ////////////////
  333. // This class is basically just an array of 1024 strings,
  334. // the names of each WM_ message. Constructor initializes it.
  335. //
  336. class CWndMsgMap {
  337. static LPCTSTR Names[]; // array of WM_ message names
  338. public:
  339. CWndMsgMap(); // constructor initializes them
  340. CString GetMsgName(UINT msg); // get name of message
  341. };
  342. LPCTSTR CWndMsgMap::Names[WM_USER]; // name of each WM_ message
  343. //////////////////
  344. // Initialize array from sparse data
  345. //
  346. CWndMsgMap::CWndMsgMap()
  347. {
  348. // copy sparse MsgData into table
  349. memset(Names, 0, sizeof(Names));
  350. for (int i=0; MsgData[i].msg; i++)
  351. Names[MsgData[i].msg] = MsgData[i].name;
  352. }
  353. ////////////////
  354. // Get the name of a WM_ message
  355. //
  356. CString CWndMsgMap::GetMsgName(UINT msg)
  357. {
  358. CString name;
  359. if (msg>=WM_USER)
  360. name.Format(_T("WM_USER+%d"), msg-WM_USER);
  361. else if (Names[msg])
  362. name = Names[msg];
  363. else
  364. name.Format(_T("0x%04x"), msg);
  365. return name;
  366. }
  367. //////////////////
  368. // Get name of WM_ message.
  369. //
  370. CString sDbgName(UINT uMsg)
  371. {
  372. static CWndMsgMap wndMsgMap; // instantiate 1st time called
  373. return wndMsgMap.GetMsgName(uMsg);
  374. }
  375. #ifdef REFIID
  376. // Most apps don't need to use DbgName(REFIID)
  377. // Apps that do can set this static global to a table of
  378. // DBGINTERFACENAME's it wants to TRACE with DbgName(REFIID)
  379. //
  380. DBGINTERFACENAME* _pDbgInterfaceNames = NULL;
  381. //////////////////
  382. // Get OLE interface name.
  383. //
  384. CString sDbgName(REFIID iid)
  385. {
  386. if (_pDbgInterfaceNames)
  387. {
  388. for (int i=0; _pDbgInterfaceNames[i].name; i++)
  389. {
  390. if (memcmp(_pDbgInterfaceNames[i].piid, &iid, sizeof(IID))==0)
  391. return _pDbgInterfaceNames[i].name;
  392. }
  393. }
  394. static CString s;
  395. s.Format(_T("{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}"),
  396. iid.Data1, iid.Data2, iid.Data3,
  397. iid.Data4[0], iid.Data4[1], iid.Data4[2], iid.Data4[3],
  398. iid.Data4[4], iid.Data4[5], iid.Data4[6], iid.Data4[7]);
  399. return s;
  400. }
  401. #endif // REFIID
  402. #endif // DEBUG