473,508 Members | 2,214 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 979

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4343
by: Thomas Philips | last post by:
To experiment with filtering, I define a function f(x,k) as follows >>> def f(x,k=2): return x%k==0 I can check that it works by typing >>> f(10,3) False Now, I try to filter a range using...
2
1529
by: Nautilus | last post by:
Taken from a couple very similar samples on the net, I'm having trouble passing a parameter to a PHP file. Here's all the JS code ... it creates an image object and modifies it's src to make a...
5
8370
by: Mike Carroll | last post by:
I have a COM server that's generally working ok. But one of its methods, when the IDL gets read by the Intertop layer, has parameters of type "out object". The C# compiler tells me that it...
0
1447
by: AliceSee | last post by:
I have two Application Domain A and B. I declare an MarshalByRef object called ObjectA in Domain A. I declare another MarshalByRef object called ObjectB in Domain B. ObjectB has a function...
2
1036
by: Dougie | last post by:
I have a C# application that runs on the local machine. I want to write code that will pass an object from this application to a remote webservice. Is this possible and are there any example...
4
2278
by: Greg | last post by:
What are the compile time and runtime differences between a .NET object? For example, with COM, an object is compiled and delivered as a native binary. It must be registered on the target...
8
8886
by: =?Utf-8?B?UmF2aQ==?= | last post by:
Hi, I'm trying to pass values of different data-types to a web-service. I thought it would be easier to box these values and pass them as a System.object parameter, like public void...
2
3712
by: JackC | last post by:
Hi, I create my threads like this: for(int j = 0; j < 5; j++) { boost::thread *thr = new boost::thread(worker_func); threads.add_thread(thr); }
0
7336
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7401
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7063
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7504
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5640
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5059
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4720
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1568
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.