Help! On Winows 2000 Advanced server, I have a VB6 EXE that can repeatedly call a DLL. The DLL is in COM+ and I can see the object working. If the EXE is repeatedly calling the DLL AND I have another process call that same DLL, I can see the Objects counter increment/decrement, but the EXE yields an error "5-Invallid procedure call or argument" on the (next?) CreateObject. It seems to run ok if the second call isn't made while it's processing.
The EXE is a task that wakes up every minute looking for batch-type work to do. When it finds something to do, it calls the DLL. The DLL is also call from a Web ASP.
I've tried using ObjectContext, thinking maybe it wasn't creating/deleting objects properly, but it doesn't seem to help.
The call to the DLL is currently using a Long and Strings. I think I read to use Variants instead, but the COM+ object count never goes back to 0 when doing that for some reason. The Call Time resets back to 0, but the Object Count doesn't.
After receiving a number of the errors, the process seems to hang and won't work anymore. I currently get around the problem by manually Shutting Down the COM+ Application occassionally during the day. I've also thoroughly checked for memory leaks (missing set x=nothing, etc.)
Below are some snippets of code. Any help is greatly appreciated.
The DLL is set to 5-MultiUse, 1-NoTransactions, 0-NotPersistable.
DLL Code (TestDLL.clsTestDLL)
-----------------------------------------------------------
...
Private objContext As ObjectContext
...
Public Function Submit(strFirmID As String, lngReportHistoryID As Long, Optional strChildAccountNo As String) As String
...
working code here
...
set objContext=GetObjectContext()
if lngErrorNumber=0 Then
objContext.SetComplete
else
objContext.SetAbort
end if
...
EXE Code (TestEXE.EXE)
-----------------------------------------------------------
...
Private objProcessReport As TestDLL.clsTestDLL
...
Set objProcessReport=CreateObject("TestDLL.clsTestDLL"
...
strFile=objProcessReport.Submit(rstSites.Fields("FirmID", rstReportHistory.Fields("cntID", rstGroupAccount.Fields("AccountNo")
Set objProcessReport=Nothing
...
Thanks!
Jeff Clark
The EXE is a task that wakes up every minute looking for batch-type work to do. When it finds something to do, it calls the DLL. The DLL is also call from a Web ASP.
I've tried using ObjectContext, thinking maybe it wasn't creating/deleting objects properly, but it doesn't seem to help.
The call to the DLL is currently using a Long and Strings. I think I read to use Variants instead, but the COM+ object count never goes back to 0 when doing that for some reason. The Call Time resets back to 0, but the Object Count doesn't.
After receiving a number of the errors, the process seems to hang and won't work anymore. I currently get around the problem by manually Shutting Down the COM+ Application occassionally during the day. I've also thoroughly checked for memory leaks (missing set x=nothing, etc.)
Below are some snippets of code. Any help is greatly appreciated.
The DLL is set to 5-MultiUse, 1-NoTransactions, 0-NotPersistable.
DLL Code (TestDLL.clsTestDLL)
-----------------------------------------------------------
...
Private objContext As ObjectContext
...
Public Function Submit(strFirmID As String, lngReportHistoryID As Long, Optional strChildAccountNo As String) As String
...
working code here
...
set objContext=GetObjectContext()
if lngErrorNumber=0 Then
objContext.SetComplete
else
objContext.SetAbort
end if
...
EXE Code (TestEXE.EXE)
-----------------------------------------------------------
...
Private objProcessReport As TestDLL.clsTestDLL
...
Set objProcessReport=CreateObject("TestDLL.clsTestDLL"
...
strFile=objProcessReport.Submit(rstSites.Fields("FirmID", rstReportHistory.Fields("cntID", rstGroupAccount.Fields("AccountNo")
Set objProcessReport=Nothing
...
Thanks!
Jeff Clark