public AsciiCompiledTextSearchNative(
        NativeMethods.SearchAlgorithmKind kind,
        string pattern,
        NativeMethods.SearchOptions searchOptions) {
      _patternHandle = new SafeHGlobalHandle(Marshal.StringToHGlobalAnsi(pattern));
      var patternLength = pattern.Length;

      _handle = CreateSearchHandle(kind, _patternHandle, patternLength, searchOptions);
      _searchBufferSize = NativeMethods.AsciiSearchAlgorithm_GetSearchBufferSize(_handle);
    }
        public AsciiCompiledTextSearchNative(
            NativeMethods.SearchAlgorithmKind kind,
            string pattern,
            NativeMethods.SearchOptions searchOptions)
        {
            _patternHandle = new SafeHGlobalHandle(Marshal.StringToHGlobalAnsi(pattern));
            var patternLength = pattern.Length;

            _handle           = CreateSearchHandle(kind, _patternHandle, patternLength, searchOptions);
            _searchBufferSize = NativeMethods.AsciiSearchAlgorithm_GetSearchBufferSize(_handle);
        }
Пример #3
0
 public static extern void AsciiSearchAlgorithm_CancelSearch(
   SafeSearchHandle handle,
   ref SearchParams searchParams);
Пример #4
0
 public static extern Int32 AsciiSearchAlgorithm_GetSearchBufferSize(
   SafeSearchHandle handle);
Пример #5
0
 public static extern IntPtr AsciiSearchAlgorithm_Search(SafeSearchHandle handle, IntPtr text, int textLen);
 public AsciiStringSearchNative(NativeMethods.SearchAlgorithmKind kind, string pattern, NativeMethods.SearchOptions searchOptions)
 {
     _patternHandle = new SafeHGlobalHandle(Marshal.StringToHGlobalAnsi(pattern));
     _handle        = NativeMethods.AsciiSearchAlgorithm_Create(kind, _patternHandle.Pointer, pattern.Length, searchOptions);
     _patternLength = pattern.Length;
 }
 public AsciiStringSearchNative(NativeMethods.SearchAlgorithmKind kind, string pattern, NativeMethods.SearchOptions searchOptions)
 {
     _patternHandle = new SafeHGlobalHandle(Marshal.StringToHGlobalAnsi(pattern));
       _handle = NativeMethods.AsciiSearchAlgorithm_Create(kind, _patternHandle.Pointer, pattern.Length, searchOptions);
       _patternLength = pattern.Length;
 }
Пример #8
0
 public static extern IntPtr AsciiSearchAlgorithm_Search(SafeSearchHandle handle, IntPtr text, int textLen);
Пример #9
0
 public static extern void AsciiSearchAlgorithm_CancelSearch(
     SafeSearchHandle handle,
     ref SearchParams searchParams);
Пример #10
0
 public static extern Int32 AsciiSearchAlgorithm_GetSearchBufferSize(
     SafeSearchHandle handle);