<fiefie.niles@gmail.comwrote in message
news:1174237772.659366.257750@y80g2000hsf.googlegr oups.com...
Quote:
We have a C++ DLL that we call from VB6 program.
This is how we declare the DLL in VB6:
Declare Function RefSearch Lib "csearch32.dll" (ByVal path As String,
ByVal findword As String, ByVal CaseSensitive As Integer) As Integer
>
This is how we call the DLL in VB6:
hit = RefSearch(path, SearchStr1, ChkValue)
>
Can I call this DLL in ASP and how ?
Thank you.
>
Create an VB6 ActiveX DLL. In the project properties it is very important
that both Unattended Execution and Retained In Memory are selected otherwise
your site will crash for almost inexplicable reasons. For performance
reasons apartment threading is strongly recommend. You do not need to
recompile your existing C++ dll.
You VB6 code can look something like this:-
'Project MyAspHelper
'Class CSearch
Private Declare Function RefSearch Lib "csearch32.dll" (ByVal path As
String,
ByVal findword As String, ByVal CaseSensitive As Integer) As Integer
Public Function Search(ByVal Path As String, ByVal FindWord As String, ByVal
CaseSensitive As String) As Integer
Search = RefSearch(Path, FindWord, CaseSensitive)
End Function
Now in ASP you can use:-
Dim oSearch : Set oSearch = CreateObject("MyAspHelper.CSearch")
Dim lRes
lRes = oSearch.Search(FileName, "Hello", False)