Пример #1
0
        public uint FindPattern(uint dwStart, int nSize, byte[] bPattern, string szMask)
        {
            PatternDataEntry dataentry = null;

            foreach (PatternDataEntry pda in m_Data)
            {
                if (dwStart == pda.Start && nSize == pda.Size)
                {
                    dataentry = pda;
                    break;
                }
            }

            if (dataentry == null)
            {
                dataentry = new PatternDataEntry(dwStart, nSize, this.ReadBytes(dwStart, nSize));
                if (dataentry.bData == null)
                {
                    int oops = System.Runtime.InteropServices.Marshal.GetLastWin32Error();
                }
                m_Data.Add(dataentry);
            }

            return((uint)(dwStart + SPattern.FindPattern(dataentry.bData, bPattern, szMask)));
        }
Пример #2
0
        public uint FindPattern(uint dwStart, int nSize, byte[] bPattern, string szMask)
        {
            PatternDataEntry dataentry = null;

            foreach (PatternDataEntry pda in m_Data)
            {
                if (dwStart == pda.Start && nSize == pda.Size)
                {
                    dataentry = pda;
                    break;
                }
            }

            if (dataentry == null)
            {
                dataentry = new PatternDataEntry(dwStart, nSize, this.ReadBytes(dwStart, nSize));
                m_Data.Add(dataentry);
            }

            return((uint)(dwStart + SPattern.FindPattern(dataentry.bData, bPattern, szMask)));
        }