471,330 Members | 1,767 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

Passing an object as parameter to a COM+ application (.NET assembly) from ASP (classic)

Stituation:
-----------------------
1) COM+ application with .NET components (using regasm, interfaces
etc.)
2) ASP (classic) creates an instance of a object using
Server.CreateObject. The instance is of type ClassA (.NET object). This
is a normal class having some properties. Some properties will be set
in ASP
3) ASP (classic) creates an instance of a object using
Server.CreateObject. The instance is of type ClassB (.NET object). Then
a method in ClassB is called with parameter: a instance of the ClassA
(see 2)

Sample ASP code:
-----------------------
Dim classA, classB

Set classA = Server.CreateObject("Company.Product.ClassA")
classA.Property1 = 1;
classA.Property2 = "test";
classA.Property3 = "test2";

Set classB = Server.CreateObject("Company.Product.ClassB")
result = classB.execute(classA) ' PROBLEM HERE!

classA = nothing;
classB = nothing;
Sample .NET code (interface):
-----------------------
int execute(ref object classA);
Problem:
-----------------------
Calling the method in ClassB is going well but the when we are in the
first line of the method and we inspect the incomming ClassA everything
is as default (after casting it to the right type: ClassA). So no
properties are set. With Respone.Write I verified that the properties
where set successfully.

I'm hoping somebody have some ideas to fix the problem. Its becoming a
bit frustrating. :'(

Jan 9 '06 #1
0 888

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Thomas Philips | last post: by
5 posts views Thread by Mike Carroll | last post: by
2 posts views Thread by Dougie | last post: by
4 posts views Thread by Greg | last post: by
8 posts views Thread by =?Utf-8?B?UmF2aQ==?= | last post: by
2 posts views Thread by JackC | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.