472,954 Members | 1,448 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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

1) COM+ application with .NET components (using regasm, interfaces
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);
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 952

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

Similar topics

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...
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...
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...
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...
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...
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...
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...
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); }
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.