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.

59 lines
1.2 KiB

  1. #include "precomp.hxx"
  2. #include "lkrcust.h"
  3. #include "..\samples\hashtest\wordhash.h"
  4. BOOL
  5. WINAPI
  6. CWordHash_LKHT_Dump(
  7. IN CLKRHashTable* pht,
  8. IN INT nVerbose)
  9. {
  10. dprintf("CWordHash\n");
  11. return TRUE;
  12. }
  13. BOOL
  14. WINAPI
  15. CWordHash_LKLH_Dump(
  16. IN CLKRLinearHashTable* plht,
  17. IN INT nVerbose)
  18. {
  19. dprintf("CWordHash\n");
  20. return TRUE;
  21. }
  22. BOOL
  23. WINAPI
  24. CWordHash_RecordDump(
  25. IN const void* pvRecord,
  26. IN DWORD dwSignature,
  27. IN INT nVerbose)
  28. {
  29. // Don't want to provide CWord ctor, so use CPP_VAR macros
  30. DEFINE_CPP_VAR(CWord, word);
  31. CWord* pWord = GET_CPP_VAR_PTR(CWord, word);
  32. // Copy the CWord from the debuggee's memory
  33. ReadMemory(pvRecord, &word, sizeof(CWord), NULL);
  34. // Read the associated string from the debuggee's memory
  35. char sz[4096];
  36. ReadMemory(pWord->m_str.m_psz, sz, min(4096, pWord->m_str.m_cch+1), NULL);
  37. sz[4096-1] = '\0';
  38. dprintf("%p (%08x): str=(\"%s\", %d)"
  39. ", NF=%d, fIns=%d, fIter=%d, Refs=%d"
  40. "\n",
  41. pvRecord, dwSignature, sz, pWord->m_str.m_cch,
  42. pWord->m_cNotFound, (int) pWord->m_fInserted,
  43. (int) pWord->m_fIterated, pWord->m_cRefs
  44. );
  45. return TRUE;
  46. }