Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error In Loading DLL

0 views
Skip to first unread message

Kip Fryman

unread,
May 7, 2001, 1:14:31 PM5/7/01
to
I am getting Error In Loading DLL Error on this occasionally... X has
referenced an exposed collection from an MTS object. The MTS object Sched
has already been created without a hitch

Set X = Sched.GetSchedules(cboClients.ItemData(cboClients.ListIndex))
For Each SchedItem In X 'The error occures here sometimes

Anyone know what can cause this. GetSchedules is just a function that
returns a collection object from MTS. X is a collection object type.

Thanks,

Kip

Egbert Nierop

unread,
May 9, 2001, 6:38:17 AM5/9/01
to
The collection object is not a good candidate to be marshaled through MTS /
COM+.
This is because the enumerator _NewEnum is a tricky property that the COM+
proxy just cannot pass very well.

I had the same problem myself until I decided to include the typelibrary
inside the DLL completely instead of external.
However, I was not using the collection object but a variantdictionary
object. It had the same enumerator (for ..each) support problems.

try to run the object in-process.

--
Egbert Nierop

Session management for webfarms:
http://www.nieropwebconsult.nl/asp_session_manager.htm
"Kip Fryman" <k...@NOSPAM.com> wrote in message
news:#4urbkx1AHA.1548@tkmsftngp02...

Kip Fryman

unread,
May 9, 2001, 9:40:40 AM5/9/01
to
I have to run it out of process because it has to gather information from
the server.....
I am actually returning a collection object from a function
(GetCollection).. I am not using a NewEnum procedure that returns IUnknown
and the procedure ID is (but it isn't) set to -4.

That is very limited. I thought MTS was supposed to handle this type of
business object senario.. How then else would you return a whole bunch of
data without using a collection (parent/children)..

Does this mean you would have to return a recordset? Which is what I believe
in the documentation to be used as a last resort..

Did you get the same errors as me?.. Mine works sometimes though.

I wonder if a For i = 1 to x.count would be better??

"Egbert Nierop" <egbert...@nospam.com> wrote in message
news:eSsfpSH2AHA.1416@tkmsftngp03...

0 new messages