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.

575 lines
17 KiB

  1. /************************************************************************
  2. * *
  3. * INTEL CORPORATION PROPRIETARY INFORMATION *
  4. * *
  5. * This software is supplied under the terms of a license *
  6. * agreement or non-disclosure agreement with Intel Corporation *
  7. * and may not be copied or disclosed except in accordance *
  8. * with the terms of that agreement. *
  9. * *
  10. * Copyright (C) 1997 Intel Corp. All Rights Reserved *
  11. * *
  12. * $Archive: S:\sturgeon\src\gki\vcs\debug.cpv $
  13. * *
  14. * $Revision: 1.5 $
  15. * $Date: 17 Jan 1997 09:01:50 $
  16. * *
  17. * $Author: CHULME $
  18. * *
  19. * $Log: S:\sturgeon\src\gki\vcs\debug.cpv $
  20. //
  21. // Rev 1.5 17 Jan 1997 09:01:50 CHULME
  22. // No change.
  23. //
  24. // Rev 1.4 10 Jan 1997 16:13:52 CHULME
  25. // Removed MFC dependency
  26. //
  27. // Rev 1.3 17 Dec 1996 18:22:20 CHULME
  28. // Switch src and destination fields on ARQ for Callee
  29. //
  30. // Rev 1.2 22 Nov 1996 15:22:30 CHULME
  31. // Added VCS log to the header
  32. *************************************************************************/
  33. // Debug.cpp : Contains conditional compiled debug dump routines
  34. //
  35. #include "precomp.h"
  36. #include <winsock.h>
  37. #include "GKICOM.H"
  38. #include "dspider.h"
  39. #ifdef _DEBUG
  40. extern "C" WORD DLL_EXPORT
  41. Dump_GKI_RegistrationRequest(long lVersion,
  42. SeqTransportAddr *pCallSignalAddr,
  43. EndpointType *pTerminalType,
  44. SeqAliasAddr *pRgstrtnRqst_trmnlAls,
  45. HWND hWnd,
  46. WORD wBaseMessage,
  47. unsigned short usRegistrationTransport)
  48. {
  49. SeqTransportAddr *ps2;
  50. SeqAliasAddr *ps4;
  51. unsigned short len, us;
  52. char *pc;
  53. char szGKDebug[80];
  54. wsprintf(szGKDebug, "\tlVersion = %X\n", lVersion);
  55. OutputDebugString(szGKDebug);
  56. for (ps2 = pCallSignalAddr; ps2 != NULL; ps2 = ps2->next)
  57. {
  58. wsprintf(szGKDebug, "\tpCallSignalAddr->value.choice = %X\n", ps2->value.choice);
  59. OutputDebugString(szGKDebug);
  60. ASSERT((ps2->value.choice == ipAddress_chosen) || (ps2->value.choice == ipxAddress_chosen));
  61. switch (ps2->value.choice)
  62. {
  63. case ipAddress_chosen:
  64. len = (unsigned short) ps2->value.u.ipAddress.ip.length;
  65. wsprintf(szGKDebug, "\tpCallSignalAddr->value.u.ipAddress.ip.length = %X\n", len);
  66. OutputDebugString(szGKDebug);
  67. OutputDebugString("\tpCallSignalAddr->value.u.ipAddress.ip.value = ");
  68. for (us = 0; us < len; us++)
  69. {
  70. wsprintf(szGKDebug, "%d.", ps2->value.u.ipAddress.ip.value[us]);
  71. OutputDebugString(szGKDebug);
  72. }
  73. wsprintf(szGKDebug, "\n\tpCallSignalAddr->value.u.ipAddress.port = %X\n",
  74. ps2->value.u.ipAddress.port);
  75. OutputDebugString(szGKDebug);
  76. break;
  77. case ipxAddress_chosen:
  78. len = (unsigned short) ps2->value.u.ipxAddress.node.length;
  79. wsprintf(szGKDebug, "\tpCallSignalAddr->value.u.ipxAddress.node.length = %X\n", len);
  80. OutputDebugString(szGKDebug);
  81. OutputDebugString("\tpCallSignalAddr->value.u.ipxAddress.node.value = ");
  82. for (us = 0; us < len; us++)
  83. {
  84. wsprintf(szGKDebug, "%02X", ps2->value.u.ipxAddress.node.value[us]);
  85. OutputDebugString(szGKDebug);
  86. }
  87. len = (unsigned short) ps2->value.u.ipxAddress.netnum.length;
  88. wsprintf(szGKDebug, "\n\tpCallSignalAddr->value.u.ipxAddress.netnum.length = %X\n", len);
  89. OutputDebugString(szGKDebug);
  90. OutputDebugString("\tpCallSignalAddr->value.u.ipxAddress.netnum.value = ");
  91. for (us = 0; us < len; us++)
  92. {
  93. wsprintf(szGKDebug, "%02X", ps2->value.u.ipxAddress.netnum.value[us]);
  94. OutputDebugString(szGKDebug);
  95. }
  96. len = (unsigned short) ps2->value.u.ipxAddress.port.length;
  97. wsprintf(szGKDebug, "\n\tpCallSignalAddr->value.u.ipxAddress.port.length = %X\n", len);
  98. OutputDebugString(szGKDebug);
  99. OutputDebugString("\tpCallSignalAddr->value.u.ipxAddress.port.value = ");
  100. for (us = 0; us < len; us++)
  101. {
  102. wsprintf(szGKDebug, "%02X", ps2->value.u.ipxAddress.port.value[us]);
  103. OutputDebugString(szGKDebug);
  104. }
  105. OutputDebugString("\n");
  106. break;
  107. }
  108. }
  109. wsprintf(szGKDebug, "\tpTerminalType->bit_mask = %X\n", pTerminalType->bit_mask);
  110. OutputDebugString(szGKDebug);
  111. wsprintf(szGKDebug, "\tpTerminalType->mc = %X\n", pTerminalType->mc);
  112. OutputDebugString(szGKDebug);
  113. wsprintf(szGKDebug, "\tpTerminalType->undefinedNode = %X\n", pTerminalType->undefinedNode);
  114. OutputDebugString(szGKDebug);
  115. for (ps4 = pRgstrtnRqst_trmnlAls; ps4 != NULL; ps4 = ps4->next)
  116. {
  117. wsprintf(szGKDebug, "\tpRgstrtnRqst_trmnlAls->value.choice = %X\n", ps4->value.choice);
  118. OutputDebugString(szGKDebug);
  119. ASSERT((ps4->value.choice == e164_chosen) || (ps4->value.choice == h323_ID_chosen));
  120. switch (ps4->value.choice)
  121. {
  122. case e164_chosen:
  123. OutputDebugString("\tpRgstrtnRqst_trmnlAls->value.u.e164 = ");
  124. for (pc = ps4->value.u.e164; *pc != 0; pc++)
  125. {
  126. wsprintf(szGKDebug, "%c", *pc);
  127. OutputDebugString(szGKDebug);
  128. }
  129. OutputDebugString("\n");
  130. break;
  131. case h323_ID_chosen:
  132. len = (unsigned short) ps4->value.u.h323_ID.length;
  133. wsprintf(szGKDebug, "\tpRgstrtnRqst_trmnlAls->value.u.h323ID.length = %X\n", len);
  134. OutputDebugString(szGKDebug);
  135. OutputDebugString("\tpRgstrtnRqst_trmnlAls->value.u.h323ID.value = ");
  136. for (us = 0; us < len; us++)
  137. {
  138. wsprintf(szGKDebug, "%c", ps4->value.u.h323_ID.value[us]);
  139. OutputDebugString(szGKDebug);
  140. }
  141. OutputDebugString("\n");
  142. break;
  143. }
  144. }
  145. wsprintf(szGKDebug, "\thWnd = %p\n", hWnd);
  146. OutputDebugString(szGKDebug);
  147. wsprintf(szGKDebug, "\twBaseMessage = %X\n", wBaseMessage);
  148. OutputDebugString(szGKDebug);
  149. wsprintf(szGKDebug, "\tRegistrationTransport = %X\n", usRegistrationTransport);
  150. OutputDebugString(szGKDebug);
  151. return (0);
  152. }
  153. extern "C" WORD DLL_EXPORT
  154. Dump_GKI_AdmissionRequest(unsigned short usCallTypeChoice,
  155. SeqAliasAddr *pRemoteInfo,
  156. TransportAddress *pRemoteCallSignalAddress,
  157. SeqAliasAddr *pDestExtraCallInfo,
  158. BandWidth bandWidth,
  159. ConferenceIdentifier *pConferenceID,
  160. BOOL activeMC,
  161. BOOL answerCall,
  162. unsigned short usCallTransport)
  163. {
  164. TransportAddress *ps2;
  165. SeqAliasAddr *ps4;
  166. unsigned short len, us;
  167. char *pc;
  168. char szGKDebug[80];
  169. wsprintf(szGKDebug, "\tusCallTypeChoice = %X\n", usCallTypeChoice);
  170. OutputDebugString(szGKDebug);
  171. for (ps4 = pRemoteInfo; ps4 != NULL; ps4 = ps4->next)
  172. {
  173. wsprintf(szGKDebug, "\tpRemoteInfo->value.choice = %X\n", ps4->value.choice);
  174. OutputDebugString(szGKDebug);
  175. ASSERT((ps4->value.choice == e164_chosen) || (ps4->value.choice == h323_ID_chosen));
  176. switch (ps4->value.choice)
  177. {
  178. case e164_chosen:
  179. OutputDebugString("\tpRemoteInfo->value.u.e164 = ");
  180. for (pc = ps4->value.u.e164; *pc != 0; pc++)
  181. {
  182. wsprintf(szGKDebug, "%c", *pc);
  183. OutputDebugString(szGKDebug);
  184. }
  185. OutputDebugString("\n");
  186. break;
  187. case h323_ID_chosen:
  188. len = (unsigned short) ps4->value.u.h323_ID.length;
  189. wsprintf(szGKDebug, "\tpRemoteInfo->value.u.h323ID.length = %X\n", len);
  190. OutputDebugString(szGKDebug);
  191. OutputDebugString("\tpRemoteInfo->value.u.h323ID.value = ");
  192. for (us = 0; us < len; us++)
  193. {
  194. wsprintf(szGKDebug, "%c", ps4->value.u.h323_ID.value[us]);
  195. OutputDebugString(szGKDebug);
  196. }
  197. OutputDebugString("\n");
  198. break;
  199. }
  200. }
  201. ps2 = pRemoteCallSignalAddress;
  202. if (ps2)
  203. {
  204. wsprintf(szGKDebug, "\tpRemoteCallSignalAddress->choice = %X\n", ps2->choice);
  205. OutputDebugString(szGKDebug);
  206. ASSERT((ps2->choice == ipAddress_chosen) || (ps2->choice == ipxAddress_chosen));
  207. switch (ps2->choice)
  208. {
  209. case ipAddress_chosen:
  210. len = (unsigned short) ps2->u.ipAddress.ip.length;
  211. wsprintf(szGKDebug, "\tpRemoteCallSignalAddress->u.ipAddress.ip.length = %X\n", len);
  212. OutputDebugString(szGKDebug);
  213. OutputDebugString("\tpRemoteCallSignalAddress->u.ipAddress.ip.value = ");
  214. for (us = 0; us < len; us++)
  215. {
  216. wsprintf(szGKDebug, "%d.", ps2->u.ipAddress.ip.value[us]);
  217. OutputDebugString(szGKDebug);
  218. }
  219. wsprintf(szGKDebug, "\n\tpRemoteCallSignalAddress->u.ipAddress.port = %X\n",
  220. ps2->u.ipAddress.port);
  221. OutputDebugString(szGKDebug);
  222. break;
  223. case ipxAddress_chosen:
  224. len = (unsigned short) ps2->u.ipxAddress.node.length;
  225. wsprintf(szGKDebug, "\tpRemoteCallSignalAddress->u.ipxAddress.node.length = %X\n", len);
  226. OutputDebugString(szGKDebug);
  227. OutputDebugString("\tpRemoteCallSignalAddress->u.ipxAddress.node.value = ");
  228. for (us = 0; us < len; us++)
  229. {
  230. wsprintf(szGKDebug, "%02X", ps2->u.ipxAddress.node.value[us]);
  231. OutputDebugString(szGKDebug);
  232. }
  233. len = (unsigned short) ps2->u.ipxAddress.netnum.length;
  234. wsprintf(szGKDebug, "\n\tpRemoteCallSignalAddress->u.ipxAddress.netnum.length = %X\n", len);
  235. OutputDebugString(szGKDebug);
  236. OutputDebugString("\tpRemoteCallSignalAddress->u.ipxAddress.netnum.value = ");
  237. for (us = 0; us < len; us++)
  238. {
  239. wsprintf(szGKDebug, "%02X", ps2->u.ipxAddress.netnum.value[us]);
  240. OutputDebugString(szGKDebug);
  241. }
  242. len = (unsigned short) ps2->u.ipxAddress.port.length;
  243. wsprintf(szGKDebug, "\n\tpRemoteCallSignalAddress->u.ipxAddress.port.length = %X\n", len);
  244. OutputDebugString(szGKDebug);
  245. OutputDebugString("\tpRemoteCallSignalAddress->u.ipxAddress.port.value = ");
  246. for (us = 0; us < len; us++)
  247. {
  248. wsprintf(szGKDebug, "%02X", ps2->u.ipxAddress.port.value[us]);
  249. OutputDebugString(szGKDebug);
  250. }
  251. OutputDebugString("\n");
  252. break;
  253. }
  254. }
  255. for (ps4 = pDestExtraCallInfo; ps4 != NULL; ps4 = ps4->next)
  256. {
  257. wsprintf(szGKDebug, "\tpDestExtraCallInfo->value.choice = %X\n", ps4->value.choice);
  258. OutputDebugString(szGKDebug);
  259. ASSERT((ps4->value.choice == e164_chosen) || (ps4->value.choice == h323_ID_chosen));
  260. switch (ps4->value.choice)
  261. {
  262. case e164_chosen:
  263. OutputDebugString("\tpDestExtraCallInfo->value.u.e164 = ");
  264. for (pc = ps4->value.u.e164; *pc != 0; pc++)
  265. {
  266. wsprintf(szGKDebug, "%c", *pc);
  267. OutputDebugString(szGKDebug);
  268. }
  269. OutputDebugString("\n");
  270. break;
  271. case h323_ID_chosen:
  272. len = (unsigned short) ps4->value.u.h323_ID.length;
  273. wsprintf(szGKDebug, "\tpDestinationInfo->value.u.h323ID.length = %X\n", len);
  274. OutputDebugString(szGKDebug);
  275. OutputDebugString("\tpDestinationInfo->value.u.h323ID.value = ");
  276. for (us = 0; us < len; us++)
  277. {
  278. wsprintf(szGKDebug, "%c", ps4->value.u.h323_ID.value[us]);
  279. OutputDebugString(szGKDebug);
  280. }
  281. OutputDebugString("\n");
  282. break;
  283. }
  284. }
  285. wsprintf(szGKDebug, "\tbandWidth = %X\n", bandWidth);
  286. OutputDebugString(szGKDebug);
  287. if (pConferenceID)
  288. {
  289. wsprintf(szGKDebug, "\tpConferenceID->length = %X\n", pConferenceID->length);
  290. OutputDebugString(szGKDebug);
  291. OutputDebugString("\tpConferenceID->value = ");
  292. for (us = 0; us < pConferenceID->length; us++)
  293. {
  294. wsprintf(szGKDebug, "%02X", pConferenceID->value[us]);
  295. OutputDebugString(szGKDebug);
  296. }
  297. OutputDebugString("\n");
  298. }
  299. wsprintf(szGKDebug, "\tactiveMC = %X\n", activeMC);
  300. OutputDebugString(szGKDebug);
  301. wsprintf(szGKDebug, "\tanswerCall = %X\n", answerCall);
  302. OutputDebugString(szGKDebug);
  303. wsprintf(szGKDebug, "\tusCallTransport = %X\n", usCallTransport);
  304. OutputDebugString(szGKDebug);
  305. return (0);
  306. }
  307. extern "C" WORD DLL_EXPORT
  308. Dump_GKI_LocationRequest(SeqAliasAddr *pLocationInfo)
  309. {
  310. SeqAliasAddr *ps4;
  311. unsigned short len, us;
  312. char *pc;
  313. char szGKDebug[80];
  314. for (ps4 = pLocationInfo; ps4 != NULL; ps4 = ps4->next)
  315. {
  316. wsprintf(szGKDebug, "\tpLocationInfo->value.choice = %X\n", ps4->value.choice);
  317. OutputDebugString(szGKDebug);
  318. ASSERT((ps4->value.choice == e164_chosen) || (ps4->value.choice == h323_ID_chosen));
  319. switch (ps4->value.choice)
  320. {
  321. case e164_chosen:
  322. OutputDebugString("\tpLocationInfo->value.u.e164 = ");
  323. for (pc = ps4->value.u.e164; *pc != 0; pc++)
  324. {
  325. wsprintf(szGKDebug, "%c", *pc);
  326. OutputDebugString(szGKDebug);
  327. }
  328. OutputDebugString("\n");
  329. break;
  330. case h323_ID_chosen:
  331. len = (unsigned short) ps4->value.u.h323_ID.length;
  332. wsprintf(szGKDebug, "\tpLocationInfo->value.u.h323ID.length = %X\n", len);
  333. OutputDebugString(szGKDebug);
  334. OutputDebugString("\tpLocationInfo->value.u.h323ID.value = ");
  335. for (us = 0; us < len; us++)
  336. {
  337. wsprintf(szGKDebug, "%c", ps4->value.u.h323_ID.value[us]);
  338. OutputDebugString(szGKDebug);
  339. }
  340. OutputDebugString("\n");
  341. break;
  342. }
  343. }
  344. return (0);
  345. }
  346. void
  347. SpiderWSErrDecode(int nErr)
  348. {
  349. #ifdef _DEBUG
  350. char szGKDebug[80];
  351. #endif
  352. SPIDER_DEBUG(nErr);
  353. switch (nErr)
  354. {
  355. case WSAEINTR:
  356. OutputDebugString("WSAEINTR\n");
  357. break;
  358. case WSAEBADF:
  359. OutputDebugString("WSAEBADF\n");
  360. break;
  361. case WSAEACCES:
  362. OutputDebugString("WSAEACCES\n");
  363. break;
  364. case WSAEFAULT:
  365. OutputDebugString("WSAEFAULT\n");
  366. break;
  367. case WSAEINVAL:
  368. OutputDebugString("WSAEINVAL\n");
  369. break;
  370. case WSAEMFILE:
  371. OutputDebugString("WSAEMFILE\n");
  372. break;
  373. case WSAEWOULDBLOCK:
  374. OutputDebugString("WSAEWOULDBLOCK\n");
  375. break;
  376. case WSAEINPROGRESS:
  377. OutputDebugString("WSAEINPROGRESS\n");
  378. break;
  379. case WSAEALREADY:
  380. OutputDebugString("WSAEALREADY\n");
  381. break;
  382. case WSAENOTSOCK:
  383. OutputDebugString("WSAENOTSOCK\n");
  384. break;
  385. case WSAEDESTADDRREQ:
  386. OutputDebugString("WSAEDESTADDRREQ\n");
  387. break;
  388. case WSAEMSGSIZE:
  389. OutputDebugString("WSAEMSGSIZE\n");
  390. break;
  391. case WSAEPROTOTYPE:
  392. OutputDebugString("WSAEPROTOTYPE\n");
  393. break;
  394. case WSAENOPROTOOPT:
  395. OutputDebugString("WSAENOPROTOOPT\n");
  396. break;
  397. case WSAEPROTONOSUPPORT:
  398. OutputDebugString("WSAEPROTONOSUPPORT\n");
  399. break;
  400. case WSAESOCKTNOSUPPORT:
  401. OutputDebugString("WSAESOCKTNOSUPPORT\n");
  402. break;
  403. case WSAEOPNOTSUPP:
  404. OutputDebugString("WSAEOPNOTSUPP\n");
  405. break;
  406. case WSAEPFNOSUPPORT:
  407. OutputDebugString("WSAEPFNOSUPPORT\n");
  408. break;
  409. case WSAEAFNOSUPPORT:
  410. OutputDebugString("WSAEAFNOSUPPORT\n");
  411. break;
  412. case WSAEADDRINUSE:
  413. OutputDebugString("WSAEADDRINUSE\n");
  414. break;
  415. case WSAEADDRNOTAVAIL:
  416. OutputDebugString("WSAEADDRNOTAVAIL\n");
  417. break;
  418. case WSAENETDOWN:
  419. OutputDebugString("WSAENETDOWN\n");
  420. break;
  421. case WSAENETUNREACH:
  422. OutputDebugString("WSAENETUNREACH\n");
  423. break;
  424. case WSAENETRESET:
  425. OutputDebugString("WSAENETRESET\n");
  426. break;
  427. case WSAECONNABORTED:
  428. OutputDebugString("WSAECONNABORTED\n");
  429. break;
  430. case WSAECONNRESET:
  431. OutputDebugString("WSAECONNRESET\n");
  432. break;
  433. case WSAENOBUFS:
  434. OutputDebugString("WSAENOBUFS\n");
  435. break;
  436. case WSAEISCONN:
  437. OutputDebugString("WSAEISCONN\n");
  438. break;
  439. case WSAENOTCONN:
  440. OutputDebugString("WSAENOTCONN\n");
  441. break;
  442. case WSAESHUTDOWN:
  443. OutputDebugString("WSAESHUTDOWN\n");
  444. break;
  445. case WSAETOOMANYREFS:
  446. OutputDebugString("WSAETOOMANYREFS\n");
  447. break;
  448. case WSAETIMEDOUT:
  449. OutputDebugString("WSAETIMEDOUT\n");
  450. break;
  451. case WSAECONNREFUSED:
  452. OutputDebugString("WSAECONNREFUSED\n");
  453. break;
  454. case WSAELOOP:
  455. OutputDebugString("WSAELOOP\n");
  456. break;
  457. case WSAENAMETOOLONG:
  458. OutputDebugString("WSAENAMETOOLONG\n");
  459. break;
  460. case WSAEHOSTDOWN:
  461. OutputDebugString("WSAEHOSTDOWN\n");
  462. break;
  463. case WSAEHOSTUNREACH:
  464. OutputDebugString("WSAEHOSTUNREACH\n");
  465. break;
  466. case WSAENOTEMPTY:
  467. OutputDebugString("WSAENOTEMPTY\n");
  468. break;
  469. case WSAEPROCLIM:
  470. OutputDebugString("WSAEPROCLIM\n");
  471. break;
  472. case WSAEUSERS:
  473. OutputDebugString("WSAEUSERS\n");
  474. break;
  475. case WSAEDQUOT:
  476. OutputDebugString("WSAEDQUOT\n");
  477. break;
  478. case WSAESTALE:
  479. OutputDebugString("WSAESTALE\n");
  480. break;
  481. case WSAEREMOTE:
  482. OutputDebugString("WSAEREMOTE\n");
  483. break;
  484. case WSAEDISCON:
  485. OutputDebugString("WSAEDISCON\n");
  486. break;
  487. case WSASYSNOTREADY:
  488. OutputDebugString("WSASYSNOTREADY\n");
  489. break;
  490. case WSAVERNOTSUPPORTED:
  491. OutputDebugString("WSAVERNOTSUPPORTED\n");
  492. break;
  493. case WSANOTINITIALISED:
  494. OutputDebugString("WSANOTINITIALISED\n");
  495. break;
  496. case WSAHOST_NOT_FOUND:
  497. OutputDebugString("WSAHOST_NOT_FOUND\n");
  498. break;
  499. case WSATRY_AGAIN:
  500. OutputDebugString("WSATRY_AGAIN\n");
  501. break;
  502. case WSANO_RECOVERY:
  503. OutputDebugString("WSANO_RECOVERY\n");
  504. break;
  505. case WSANO_DATA:
  506. OutputDebugString("WSANO_DATA\n");
  507. break;
  508. #if 0 // This one is a duplicate of WSANO_DATA
  509. case WSANO_ADDRESS:
  510. OutputDebugString("WSANO_ADDRESS\n");
  511. break;
  512. #endif // 0
  513. }
  514. }
  515. void
  516. DumpMem(void *pv, int nLen)
  517. {
  518. int n, nMax;
  519. struct {
  520. char szBytes[16][3];
  521. char c;
  522. char szAscii[17];
  523. } sRecord;
  524. unsigned char *puc;
  525. unsigned char uc;
  526. char szGKDebug[80];
  527. puc = (unsigned char *)pv;
  528. while (nLen)
  529. {
  530. memset(&sRecord, ' ', sizeof(sRecord));
  531. sRecord.szBytes[15][2] = '\0';
  532. sRecord.szAscii[16] = '\0';
  533. nMax = (nLen < 16) ? nLen : 16;
  534. for (n = 0; n < nMax; n++)
  535. {
  536. uc = *(puc + n);
  537. wsprintf(&sRecord.szBytes[n][0], "%02X ", uc);
  538. sRecord.szAscii[n] = isprint(uc) ? uc : '.';
  539. }
  540. wsprintf(szGKDebug, "%p: %s '%s'\n", puc, &sRecord.szBytes[0][0], &sRecord.szAscii[0]);
  541. OutputDebugString(szGKDebug);
  542. puc += nMax;
  543. nLen -= nMax;
  544. }
  545. }
  546. #endif // _DEBUG