473,586 Members | 2,839 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.CreateOb ject. 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.CreateOb ject. 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.CreateOb ject("Company.P roduct.ClassA")
classA.Property 1 = 1;
classA.Property 2 = "test";
classA.Property 3 = "test2";

Set classB = Server.CreateOb ject("Company.P roduct.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 990

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

Similar topics

2
4347
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 >>> filter(f(k=3),range(20))
2
1532
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 'call' to the PHP file: var myobj = new Image(); myobj.src = 'http://www.mypage.com/my.php?url=' + 'anything_here'; The process seems to recognize...
5
8374
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 can't convert from object to out object, or from int* to out object, or from object to out object. In fact, I can't find anything at all that it will...
0
1453
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 to takes in ObjectA as parameters. Like this.
2
1040
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 about? Many thanks. Doug
4
2284
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 machine. Then when an app is run and it uses the COM object, the COM object is loaded into a thread of the application process at runtime (if I'm not...
8
8890
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 webmethod1(object a) where a can be of type string, DateTime, float, etc..
2
3723
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
7911
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8200
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8338
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7954
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8215
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6610
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5390
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2345
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 we have to send another system
1
1448
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.