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.

207 lines
4.0 KiB

  1. struct _FORMATS_MEM_WIN {
  2. DWORD cBits;
  3. FMTTYPE fmtType;
  4. DWORD radix;
  5. DWORD fTwoFields;
  6. DWORD cchMax;
  7. PTSTR lpszDescription;
  8. };
  9. extern _FORMATS_MEM_WIN g_FormatsMemWin[];
  10. extern const int g_nMaxNumFormatsMemWin;
  11. //
  12. // Enum type and string identifier
  13. //
  14. extern struct _INTERFACE_TYPE_NAMES {
  15. INTERFACE_TYPE type;
  16. PTSTR psz;
  17. } rgInterfaceTypeNames[MaximumInterfaceType];
  18. extern struct _BUS_TYPE_NAMES {
  19. BUS_DATA_TYPE type;
  20. PTSTR psz;
  21. } rgBusTypeNames[MaximumBusDataType];
  22. struct GEN_MEMORY_DATA {
  23. MEMORY_TYPE memtype;
  24. int nDisplayFormat;
  25. ANY_MEMORY_DATA any;
  26. };
  27. #define IDC_MEM_PREVIOUS 1234
  28. #define IDC_MEM_NEXT 1235
  29. class MEMWIN_DATA : public EDITWIN_DATA {
  30. public:
  31. char m_OffsetExpr[MAX_OFFSET_EXPR];
  32. BOOL m_UpdateExpr;
  33. ULONG64 m_OffsetRead;
  34. GEN_MEMORY_DATA m_GenMemData;
  35. HWND m_FormatCombo;
  36. HWND m_PreviousButton;
  37. HWND m_NextButton;
  38. ULONG m_Columns;
  39. BOOL m_AllowWrite;
  40. BOOL m_UpdateValue;
  41. char m_ValueExpr[MAX_OFFSET_EXPR];
  42. ULONG m_WindowDataSize;
  43. MEMWIN_DATA();
  44. virtual void Validate();
  45. virtual BOOL HasEditableProperties();
  46. virtual BOOL EditProperties();
  47. virtual HRESULT ReadState(void);
  48. virtual BOOL OnCreate(void);
  49. virtual LRESULT OnCommand(WPARAM wParam, LPARAM lParam);
  50. virtual void OnSize(void);
  51. virtual void OnTimer(WPARAM TimerId);
  52. virtual LRESULT OnNotify(WPARAM wParam, LPARAM lParam);
  53. virtual void OnUpdate(UpdateType Type);
  54. void ScrollLower(void);
  55. void ScrollHigher(void);
  56. void WriteValue(ULONG64 Offset);
  57. void UpdateOptions(void);
  58. ULONG64 GetAddressOfCurValue(
  59. PULONG pCharIndex,
  60. CHARRANGE *pCRange
  61. );
  62. };
  63. typedef MEMWIN_DATA *PMEMWIN_DATA;
  64. INT_PTR
  65. DisplayOptionsPropSheet(
  66. HWND hwndOwner,
  67. HINSTANCE hinst,
  68. MEMORY_TYPE memtypeStartPage
  69. );
  70. #if 0
  71. #define MAX_CHUNK_TOREAD 4096 // maximum chunk of memory to read at one go
  72. LRESULT
  73. CALLBACK
  74. MemoryEditProc(
  75. HWND hwnd,
  76. UINT message,
  77. WPARAM wParam,
  78. LPARAM lParam
  79. );
  80. /*
  81. void ViewMem(int view, BOOL fVoidCache);
  82. extern TCHAR memText[MAX_MSG_TXT]; //the selected text for memory dlg
  83. */
  84. struct memItem {
  85. char iStart;
  86. char cch;
  87. char iFmt;
  88. };
  89. struct memWinDesc {
  90. int iFormat;
  91. ATOM atmAddress;
  92. BOOL fLive;
  93. BOOL fHaveAddr;
  94. BOOL fBadRead; // dis we really read mem or just ??
  95. PTSTR lpbBytes;
  96. memItem *lpMi;
  97. UINT cMi;
  98. BOOL fEdit;
  99. BOOL fFill;
  100. UINT cPerLine;
  101. //ADDR addr;
  102. //ADDR orig_addr;
  103. //ADDR old_addr;
  104. TCHAR szAddress[MAX_MSG_TXT]; //the mem address expression in ascii
  105. UINT cbRead;
  106. };
  107. /*
  108. extern struct memWinDesc MemWinDesc[MAX_VIEWS];
  109. extern struct memWinDesc TempMemWinDesc;
  110. //
  111. // Define the set of memory formats
  112. //
  113. enum {
  114. MW_ASCII = 0,
  115. MW_BYTE,
  116. MW_SHORT,
  117. MW_SHORT_HEX,
  118. MW_SHORT_UNSIGNED,
  119. MW_LONG,
  120. MW_LONG_HEX,
  121. MW_LONG_UNSIGNED,
  122. MW_QUAD,
  123. MW_QUAD_HEX,
  124. MW_QUAD_UNSIGNED,
  125. MW_REAL,
  126. MW_REAL_LONG,
  127. MW_REAL_TEN
  128. };
  129. */
  130. #if 0
  131. #define MEM_FORMATS {\
  132. 1, /* ASCII */ \
  133. 1, /* BYTE */ \
  134. 2, /* SHORT */ \
  135. 2, /* SHORT_HEX */ \
  136. 2, /* SHORT_UNSIGNED */ \
  137. 4, /* LONG */ \
  138. 4, /* LONG_HEX */ \
  139. 4, /* LONG_UNSIGNED */ \
  140. 8, /* QUAD */ \
  141. 8, /* QUAD_HEX */ \
  142. 8, /* QUAD_UNSIGNED */ \
  143. 4, /* REAL */ \
  144. 8, /* REAL_LONG */ \
  145. 10, /* REAL_TEN */ \
  146. 16 /* */ \
  147. }
  148. #endif
  149. #endif