
/***************************************************************************
**
**    $Header:   D:/ECB2S/SRC/LOG/MEMSRCH.H__   1.2.1.4   17 Apr 1997 15:56:54   ZJRD  $
**
**    $Log:   D:/ECB2S/SRC/LOG/MEMSRCH.H__  $
** 
**    Rev 1.2.1.4   17 Apr 1997 15:56:54   ZJRD
** No change.
** 
**    Rev 1.2.1.3   16 Apr 1997 10:28:22   ZJRD
** No change.
** 
**    Rev 1.2.1.2   10 Apr 1997 15:38:44   ZJRD
** No change.
** 
**    Rev 1.2.1.1   03 Apr 1997 15:17:48   ZJRD
** No change.
** 
**    Rev 1.2.1.0   28 Mar 1997 10:22:48   ZJRD
** easy pack sld 2.09d
** 
**    Rev 1.1   19 Mar 1997 11:32:52   ZJRD
** No change.
** 
**    Rev 1.0   12 Mar 1997 14:48:18   ZJRD
** Initial revision.
** 
**    Rev 1.7.1.0.1.2   09 Dec 1996 10:15:00   ZJRD
** EasyPack/SLD Version 2.0P
** 
**    Rev 1.7.1.0.1.0   11 Nov 1996 12:58:16   ZJRD
** EasyPack/SLD Version 2.01
** 
**    Rev 1.7.1.4   09 Sep 1996 13:15:32   ZJRD
** No change.
** 
**    Rev 1.7.1.3   05 Sep 1996 11:27:06   ZJRD
** No change.
** 
**    Rev 1.7.1.2   02 Sep 1996 09:54:12   ZJRD
** No change.
** 
**    Rev 1.7.1.1   28 Aug 1996 15:47:46   ZJRD
** No change.
** 
**    Rev 1.7.1.0   12 Aug 1996 10:52:24   ZJRD
** EasyPack/SLD Version 1.98
** 
**    Rev 1.5   05 Jun 1996 14:55:44   ZJRD
** No change.
** 
**    Rev 1.4   29 May 1996 09:38:32   ZJRD
** No change.
** 
**    Rev 1.3   16 May 1996 09:00:50   ZJRD
** No change.
** 
**    Rev 1.2   10 May 1996 09:15:14   ZJRD
** No change.
** 
**    Rev 1.1   02 May 1996 10:29:34   ZJRD
** EasyPack/SLD Version 1.92
** 
**    Rev 1.31   18 Apr 1996 13:01:58   Shirley
** No change.
** 
**    Rev 1.30   12 Apr 1996 10:40:54   Shirley
** EasyPack/SLD Version 1.90
** 
**    Rev 1.28   15 Feb 1996 08:55:16   Shirley
** No change.
** 
**    Rev 1.27   12 Feb 1996 14:05:02   Shirley
** No change.
** 
**    Rev 1.26   06 Feb 1996 15:31:36   Shirley
** No change.
** 
**    Rev 1.25   06 Feb 1996 13:46:28   Shirley
** No change.
** 
**    Rev 1.24   01 Feb 1996 10:20:00   Shirley
** No change.
** 
**    Rev 1.23   26 Jan 1996 09:16:50   Shirley
** No change.
** 
**    Rev 1.22   25 Jan 1996 13:16:44   Shirley
** No change.
** 
**    Rev 1.21   24 Jan 1996 10:34:40   Shirley
** No change.
** 
**    Rev 1.20   23 Jan 1996 11:25:26   Shirley
** No change.
** 
**    Rev 1.19   18 Jan 1996 10:07:34   Shirley
** No change.
** 
**    Rev 1.18   15 Jan 1996 16:16:26   Shirley
** No change.
** 
**    Rev 1.17   04 Jan 1996 11:08:32   Shirley
** No change.
** 
**    Rev 1.16   30 Nov 1995 09:09:06   Shirley
** No change.
** 
**    Rev 1.15   28 Nov 1995 15:31:54   Shirley
** No change.
** 
**    Rev 1.14   21 Nov 1995 11:18:44   Shirley
** No change.
** 
**    Rev 1.13   13 Nov 1995 09:27:32   Shirley
** No change.
** 
**    Rev 1.12   12 Nov 1995 11:31:02   Shirley
** No change.
** 
**    Rev 1.11   08 Nov 1995 16:28:48   Shirley
** No change.
** 
**    Rev 1.10   08 Nov 1995 12:45:16   Shirley
** No change.
** 
**    Rev 1.9   02 Nov 1995 10:05:38   Shirley
** No change.
** 
**    Rev 1.8   27 Oct 1995 16:47:10   Shirley
** No change.
** 
**    Rev 1.7   27 Oct 1995 13:45:00   Shirley
** No change.
** 
**    Rev 1.6   25 Oct 1995 14:31:24   Shirley
** No change.
** 
**    Rev 1.5   18 Oct 1995 14:47:18   Shirley
** No change.
** 
**    Rev 1.4   13 Oct 1995 13:22:06   Shirley
** No change.
** 
**    Rev 1.3   29 Sep 1995 09:49:42   Shirley
** No change.
** 
**    Rev 1.2   20 Sep 1995 10:56:16   Shirley
** No change.
** 
**    Rev 1.1   15 Sep 1995 09:46:04   Shirley
** No change.
** 
**    Rev 1.0   07 Sep 1995 09:54:52   Shirley
** Initial revision.
**
****************************************************************************/

/////////////////////////////////////////////////////////////////////////////
//
//  File name: MEMSRCH.H
//
//  Description: The header file for the class: CMemorySearch.
//
//  Author: Chen Jun
//
//  Date: 04/29/95
//
//  Modification:
//      1. 04/29/95, Initial version of the class: CMemorySearch.
//
/////////////////////////////////////////////////////////////////////////////
#ifndef _MEMSRCH_
#define _MEMSRCH_

#include "membase.h"


/////////////////////////////////////////////////////////////////////////////
// CMemorySearch class.
class CMemorySearch : public CMemoryBase
{
// Construction & Destruction.
public:
    CMemorySearch();
    ~CMemorySearch();
    
// Member variables.
public:
    enum { MAX_SEARCH_SIZE = 32 };

private:
    char m_pchSearch[MAX_SEARCH_SIZE+1];

    char m_chPatternLen;
    
    unsigned char m_uchInsensitive;
    
    CMemoryAddr m_StartAddr, m_EndAddr, m_RetAddr;
    
    struct tagSearchInfo {
        unsigned char uchInsensitive;
        char chPatternLen;
        char pchPattern[MAX_SEARCH_SIZE+1];
    } m_SearchInfo;
    
    BOOL m_bServerRet;
    
// Implementations.
private:
    void SetPattern(char* pszPattern);
    void SetInsensitive(int nInsensitive);
    void SetSearchInfo(void);
    void MemorySearchKernel(void);
    void DisplayMatchedAddr(void);

public:
    void SearchAction(int nArgc, char* pszArgv[]);
    BOOL MemServerSearch(ADDRESS Start, ADDRESS End,
        char* pszPattern, 
        int nInsensitive, ADDRESS& uRetAddr);

};  // End of class: CMemorySearch.

#endif
//////////////////////////////// End of File ////////////////////////////////
