home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 January / Pcwk0198.iso / Zadarmo / HEXVIEW / SRC / HEXVIEWD.H < prev    next >
C/C++ Source or Header  |  1996-08-01  |  3KB  |  91 lines

  1. /* ---------------------------------------------------------------------------
  2.  
  3.    This code can be used as you wish but without warranties as to performance 
  4.    of merchantability or any other warranties whether expressed or implied.
  5.    
  6.      Written by Mike Funduc, Funduc Software Inc. 8/1/96
  7.  
  8.      To download the code and more useful utilities (including Search and
  9.      Replace for Windows 95/NT, 3.1x) go to:
  10.      http://home.sprynet.com/sprynet/funduc  or
  11.      http://ourworld.compuserve.com/homepages/funduc
  12.  
  13. ----------------------------------------------------------------------------*/
  14.  
  15. // hexviewDoc.h : interface of the CHexviewDoc class
  16. //
  17. /////////////////////////////////////////////////////////////////////////////
  18.  
  19. class CHexviewDoc : public CDocument
  20. {
  21. protected: // create from serialization only
  22.     CHexviewDoc();
  23.     DECLARE_DYNCREATE(CHexviewDoc)
  24.  
  25. // Attributes
  26. private:
  27.  CString *m_csFileName;
  28.  HANDLE m_hFile;
  29.  HANDLE m_hFileMapping;
  30.  BYTE *m_lpImage;
  31.  int m_iCurrentPointer, m_iFileSize,
  32.      m_iBlockSize;
  33. // CView *m_AssociatedView;
  34. // CFrameWnd *m_PriorityFrame;
  35. public:
  36.     BOOL GetPrevBlock(int &iCurrentOffset);
  37.     BOOL GetNextBlock(int &iCurrentOffset);
  38.  char szStatusMessage[300];
  39.  long m_lStartOffset, m_lEndOffset;
  40.  
  41. // Operations
  42. public:
  43.  
  44. // helper functions
  45.  
  46. //BYTE *AdjustPointerRelative(int iOffset);
  47. BYTE *AdjustPointerAbsolute(int iPosition);
  48. //BOOL RetrieveBytesAtCurrentPosition(BYTE *lpTarget, int iLength);
  49. //BOOL RetrieveBytesAtAbsolutePosition(BYTE *lpPosition, BYTE *lpTarget, int iLength);
  50. //inline int GetCurrentPosition() { return m_iCurrentPointer; };
  51. //void ActivateTheRightFrame();
  52. int TotalFileLength() {return m_iFileSize;};
  53. int BlockLength(int iCurrentOffset); 
  54.  
  55. // Attributes
  56. public:
  57.  
  58. // Operations
  59. public:
  60.  
  61. // Overrides
  62.     // ClassWizard generated virtual function overrides
  63.     //{{AFX_VIRTUAL(CHexviewDoc)
  64.     public:
  65.     virtual BOOL OnNewDocument();
  66.     virtual void Serialize(CArchive& ar);
  67.     virtual BOOL OnOpenDocument(LPCTSTR lpszFileName);
  68.     virtual void OnCloseDocument();
  69.     //}}AFX_VIRTUAL
  70.  
  71. // Implementation
  72. public:
  73.     virtual ~CHexviewDoc();
  74. #ifdef _DEBUG
  75.     virtual void AssertValid() const;
  76.     virtual void Dump(CDumpContext& dc) const;
  77. #endif
  78.  
  79. protected:
  80.  
  81. // Generated message map functions
  82. protected:
  83.     //{{AFX_MSG(CHexviewDoc)
  84.         // NOTE - the ClassWizard will add and remove member functions here.
  85.         //    DO NOT EDIT what you see in these blocks of generated code !
  86.     //}}AFX_MSG
  87.     DECLARE_MESSAGE_MAP()
  88. };
  89.  
  90. /////////////////////////////////////////////////////////////////////////////
  91.