Problem accessing Livelink through ActiveX DLL
I created an ActiveX DLL that pulls documents from a Folder in Livelink. The DLL was created using VB6. I am using an ASP file to call a function called RetrieveDocuments() in the DLL to pull the Livelink Documents. The code works the first time I run it but when I try to run it after that I get the following error:Microsoft VBScript runtime error '800a01fb' An exception occurred: 'RetrieveDocuments' /ssn/portalhome1.asp, line 45A sample of my code is as follows:VB File-------Dim status As LongDim session As LongDim outSize1 As LongDim outSize2 As LongConst bufsize1 = 254Dim buf As LongPublic Function RetrieveDocuments() As String Dim docName As String * bufsize1 Dim docComment As String * bufsize1 Dim docID As Long status = LL_ValueAlloc(resultset) status = LL_ValueAlloc(paramList) status = LL_ValueSetList(paramList) status = LL_ValueSetTable(resultset, paramList) If (status <> LL_OK) Then RetrieveDocuments = "Could not declare resultset" Else status = LL_SessionAlloc(session, "localhost", 2901, "Livelink1", "admin", "lladmin") If (status = LL_OK) Then status = LL_ListObjects(session, -2000, 6504, vbNullString, vbNullString, LL_PERM_SEECONTENTS, resultset) If (status = LL_OK) Then status = LL_ValueGetLength(resultset, length) ' get length of the recarray textList = "" For i = 0 To length - 1 docName = "" docComment = "" status = LL_TableGetInteger(resultset, i, "ID", docID) status = LL_TableGetString(resultset, i, "Name", docName, 255, outSize1) status = LL_TableGetString(resultset, i, "Comment", docComment, 255, outSize2) textList = textList & docID & "^" & Left(docName, outSize1) & "^" & Left(docComment, outSize2) & vbCrLf Next RetrieveDocuments = textList Else RetrieveDocuments = "Was not able to Retreive any Documents." End If Else RetrieveDocuments = "Livelink Session Could not be Established." End IfEnd If LL_ValueFree (resultset)LL_SessionFree (session)End FunctionPrivate Sub Class_Initialize() status = LL_Initialize(LL_HEADER_VERSION) End SubPrivate Sub Class_Terminate() LL_UninitializeEnd SubASP File--------<%set objLLPortal = Server.CreateObject("LLPortal.Portal")DocumentList = objLLPortal.RetrieveDocuments() ' returns document list in string...Set objLLPortal = Nothing %>I am assuming I have some kind of memory problem. Any help would be appreciated.Jeff