Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error in Loading DLL

Status
Not open for further replies.

1973yoav

Programmer
Jul 5, 2001
12
0
0
IL
Hi all.
It's a bit long so please...

Consider all the below to be working on Win2000 Server
SP-1 and SQL2000 ENT and IIS 5.the components created in
VB6 SP5.

I have exported an MTS application from my Component Service
and installed it on other Win2000 Server(actully on
several computers).
My problem is that on one computer some components don't
work.
Here is what is happening:
I have an ASP page that only does this:

<html>

<!-- creation date: 3/20/2001 -->
<head>
<title></title>
</head>
<body>
<%
dim s
set s = server.createobject(&quot;K2KKUserASP10.Session&quot;)
set s = nothing
%>
</body>

</html>



the components that's being created has this Class_Initialize()


Private Sub Class_Initialize()

Dim oc As ObjectContext, v

Set oc = GetObjectContext()
...
with Helper //Helper is being created before
Set m_obj = .CtxCreateObject(&quot;K2KKUserBLL10.KUser&quot;)
...
end with

End Sub


Now,Helper is used with MTSTranzactionMode = 0.It's not with the MTS application.
K2KKUserASP10.Session is used with MTSTranzactionMode = 2.It is with the MTS application.
K2KKUserBLL10.KUser is used with MTSTranzactionMode = 2.It is with the MTS application.

the component Helper.CtxCreateObject code is this

Public Function CtxCreateObject(ByVal sProgID As String) As Object


If Not (m_oc Is Nothing) Then
Set CtxCreateObject = m_oc.CreateInstance(sProgID)
Set m_oc = Nothing
Else
Set CtxCreateObject = CreateObject(sProgID)
End If

End Function


and that's it on one computer it work on others it does'nt
it fails on CtxCreateObject
the error i get is this:
.Error Type:
K2KKUserASP10(0x800A0030)
Error in loading DLL
/testasp/testasp.asp, Line 10


Now what is wrong here?


 

Have you tried instantiating your KUser object as you need it, rather than in the Class_Initialize or the ObjectControl_Activate events? One of the performance enhancements you can do under COM+ is to create objects only as you need them, not before.

Chip H.
 

Hi All(and chiph)

I examend the problem further more and i know the error is in
'Function CtxCreateObject'

at this line:
&quot;Set CtxCreateObject = m_oc.CreateInstance(sProgID)&quot;


can that help?
thanks
Yoav
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top