REM YGREP32.BAS: Interface description for YGREP32.DLL
REM (YGrep Search Engine 32 bit edition)
REM Note: You cannot access to all the functions of the YGrep Search Engine
REM but there is a large subset provided by the Scalar-parameter-only
REM functions interfaced here.
REM -----------------------------------------------------------------------
REM -----------------------------------------------------------------------
REM Sample code for a Visual Basic 4 (32-bits) use of various functions.
REM
REM Dim lpStrAddress As Long
REM Dim RetStr$
REM RetStr$ = String$(1024, 0)
REM
REM Etiquette1.Caption = "toto"
REM FileIn$ = "C:\usr\local\src\ygrep5\test.txt" + Chr$(0)
REM ss = SFileOpen(FileIn$)
REM Pattern$ = "YGrep" + Chr$(0)
REM ss = SCompileRGrep(Pattern$, False)
REM
REM lpStrAddress = SFileRGrep()
REM lpStrAddress = lstrcpy(RetStr$, lpStrAddress)
REM Etiquette1.Caption = RetStr$
REM
REM Thanks!
REM -----------------------------------------------------------------------
Private Declare Function lstrcpy Lib "Kernel32" (ByVal lpString1 As Any, ByVal lpString2 As Any) As Long
Private Declare function SCompileAGrep Lib "YGrep32.dll" (ByVal lpszGrepString As String, ByVal k As Integer, ByVal bMatchCase As Integer) As Integer
Private Declare function SAGrep Lib "YGrep32.dll" (ByVal lpszStringToSearch As String) As Integer
Private Declare sub SAGrepInit Lib "YGrep32.dll" ()
Private Declare sub SAGrepEmpty Lib "YGrep32.dll" ()
Private Declare function SAGrepSubsBuild Lib "YGrep32.dll" (ByVal lpszPattern As String, ByVal lpszDest As String, ByVal lSize As Long) As Integer
Private Declare function SCompileRGrep Lib "YGrep32.dll" (ByVal lpszGrepString As String, ByVal bMatchCase As Integer) As Integer
Private Declare function SRGrep Lib "YGrep32.dll" (ByVal lpszStringToSearch As String) As Integer
Private Declare function SRGrepSubsBuild Lib "YGrep32.dll" (ByVal lpszPattern As String, ByVal lpszDest As String, ByVal lSize As Long) As Integer
Private Declare function SCompileSGrep Lib "YGrep32.dll" (ByVal lpszGrepString As String, ByVal bMatchCase As Integer) As Integer
Private Declare function SSGrep Lib "YGrep32.dll" (ByVal lpszStringToSearch As String) As Integer
Private Declare function SSGrepSubsBuild Lib "YGrep32.dll" (ByVal lpszPattern As String, ByVal lpszDest As String, ByVal lSize As Long) As Integer
Private Declare sub InitWordCharTable Lib "YGrep32.dll" ()
Private Declare function AddWordChar Lib "YGrep32.dll" (ByVal lpszS As String) As Integer
Private Declare function RemoveWordChar Lib "YGrep32.dll" (ByVal lpszS As String) As Integer
Private Declare sub SFileSetFlags Lib "YGrep32.dll" ( ByVal bPrintFileName As Integer, ByVal bPrintBlockNumber As Integer, ByVal bPrintLineNumber As Integer, ByVal bCountsOnly As Integer, ByVal bNonMatching As Integer, ByVal bFileModeText As Integer )
Private Declare function SFileOpen Lib "YGrep32.dll" ( ByVal strFileName As String ) As Integer
Private Declare function SFileAGrep Lib "YGrep32.dll" () As Long
Private Declare function SFileRGrep Lib "YGrep32.dll" () As Long
Private Declare function SFileSGrep Lib "YGrep32.dll" () As Long
Private Declare function SFileTextAGrep Lib "YGrep32.dll" () As Long
Private Declare function SFileTextRGrep Lib "YGrep32.dll" () As Long
Private Declare function SFileTextSGrep Lib "YGrep32.dll" () As Long
Private Declare function SFileBinaryAGrep Lib "YGrep32.dll" () As Long
Private Declare function SFileBinaryRGrep Lib "YGrep32.dll" () As Long
Private Declare function SFileBinarySGrep Lib "YGrep32.dll" () As Long
Private Declare function SFileClose Lib "YGrep32.dll" () As Long