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.

80 lines
1.4 KiB

  1. #include "precomp.hxx"
  2. #include "lkrcust.h"
  3. enum {
  4. NAME_SIZE = LKRHASH_NS::CLKRHashTable::NAME_SIZE,
  5. };
  6. LKR_CUST_EXTN*
  7. FindLkrCustExtn(
  8. LPCSTR cmdName,
  9. VOID* lkrAddress,
  10. DWORD& rdwSig)
  11. {
  12. extern LKR_CUST_EXTN g_alce[];
  13. struct LKRheader {
  14. DWORD m_dwSignature;
  15. CHAR m_szName[NAME_SIZE];
  16. };
  17. LKRheader lkrh;
  18. rdwSig = 0;
  19. if (!ReadMemory(lkrAddress, &lkrh, sizeof(lkrh), NULL) )
  20. {
  21. dprintf(DBGEXT ".%s: cannot read memory @ %p\n",
  22. cmdName, (PVOID) lkrAddress);
  23. return NULL;
  24. }
  25. rdwSig = lkrh.m_dwSignature;
  26. lkrh.m_szName[NAME_SIZE-1] = '\0';
  27. for (LKR_CUST_EXTN* plce = g_alce + 1;
  28. plce->m_pszTableName != NULL;
  29. ++plce)
  30. {
  31. if (strcmp(plce->m_pszTableName, lkrh.m_szName) == 0)
  32. return plce;
  33. }
  34. return &g_alce[0]; // Dummy methods
  35. }
  36. BOOL
  37. WINAPI
  38. Dummy_LKHT_Dump(
  39. IN LKRHASH_NS::CLKRHashTable* pht,
  40. IN INT nVerbose)
  41. {
  42. return TRUE;
  43. }
  44. BOOL
  45. WINAPI
  46. Dummy_LKLH_Dump(
  47. IN LKRHASH_NS::CLKRLinearHashTable* plht,
  48. IN INT nVerbose)
  49. {
  50. return TRUE;
  51. }
  52. BOOL
  53. WINAPI
  54. Dummy_Record_Dump(
  55. IN const void* pvRecord,
  56. IN DWORD dwSignature,
  57. IN INT nVerbose)
  58. {
  59. dprintf("%p (%08x)\n", pvRecord, dwSignature);
  60. return TRUE;
  61. }