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.

79 lines
3.2 KiB

  1. /*****************************************************************/
  2. /** Microsoft LAN Manager **/
  3. /** Copyright(c) Microsoft Corp., 1988-1990 **/
  4. /*****************************************************************/
  5. /**** hexedit.h
  6. *
  7. * Structure and flags def's to call HexEdit
  8. *
  9. */
  10. struct HexEditParm {
  11. ULONG flag; // edit flags
  12. UCHAR *ename; // edit name (title)
  13. ULONGLONG totlen; // totlen (in bytes) being edited
  14. ULONGLONG start; // starting address of edit
  15. NTSTATUS (*read)(); // (opt) fnc to read data
  16. NTSTATUS (*write)(); // (opt) fnc to write changes
  17. HANDLE handle; // (opt) passed to read/write functions
  18. ULONG ioalign; // (opt) alignment when read/write (~editmem)
  19. UCHAR *mem; // (opt) Only if FHE_EDITMEM
  20. HANDLE Kick; // (opt) event to kick (editmem only)
  21. HANDLE Console; // (opt) callers console handle
  22. ULONG MaxLine; // (opt) if non-zero, # of lines HexEdit is to use
  23. WORD AttrNorm; // (opt) Default attribute for text
  24. WORD AttrHigh; // (opt) Default attribute for highlighted text
  25. WORD AttrReverse; // (opt) Default attribute for reversed text
  26. WORD CursorSize; // (opt) Default size of cursor
  27. ULONGLONG editloc; // Position exited/kicked at
  28. ULONG TopLine; // (opt) Relative topline, requires MaxLine
  29. } ;
  30. #define FHE_VERIFYONCE 0x0001 // Prompt before updating (just once)
  31. #define FHE_VERIFYALL 0x0002 // Prompt before any change is written
  32. #define FHE_PROMPTSEC 0x0004 // Verify prompt is for sectors
  33. #define FHE_SAVESCRN 0x0008 // Save & Restore orig screen
  34. #define FHE_EDITMEM 0x0010 // Direct mem edit
  35. #define FHE_KICKDIRTY 0x0020 // Kick event if memory gets editted
  36. #define FHE_KICKMOVE 0x0040 // Kick event every time cursor is moved
  37. #define FHE_DIRTY 0x0080 // Set when data is dirtied
  38. //efine FHE_F6 0x0100 // Exit when F6 pressed
  39. #define FHE_ENTER 0x0800 // Exit when enter pressed
  40. #define FHE_DWORD 0x0200 // Default to dword edit
  41. #define FHE_JUMP 0x0400 // Support jump option
  42. void HexEdit (struct HexEditParm *);
  43. /*
  44. * Read & Write functions are called as follows:
  45. * (note: read & write can be NULL if fhe_editmem is set.
  46. * if editmem is set & read&write are not NULL, then it is assumed
  47. * that mem points to the memory image of what read&write are to
  48. * read & write. (this is usefull for in-memory editing of items
  49. * which also are to be read&write))
  50. *
  51. * rc = read (handle, offset, buf, len, &physloc)
  52. *
  53. * rc - returned, zero sucess. non-zero error code.
  54. * handle - handle as passed into HexEdit
  55. * offset - byte offset to read/write
  56. * buf - address to read/write data
  57. * len - len to read/write (probabily a sector, but may be less)
  58. * physloc - address to put physcal sector number if known
  59. *
  60. *
  61. *
  62. * rc = write (handle, offset, buf, len, physloc)
  63. *
  64. * same as read params, expect 'physloc' is a long passed in and is
  65. * whatever was returned to read.
  66. *
  67. */