473,396 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Passing object to a com+ with variant params

Hello, i'm using a VC++ com+ object, it's reference in
vs .net, this com object have a function that have to
params, the interop com object recive Object Params and
the original com object say that this params are variants.

I'm traying to pass "object" variables to the params but
the com object return an error or a null object, the
piece of code that i'm using is:

using AgenObj;
using Scripting;

namespace SaludTotalv10.Citas
{
/// <summary>
/// Summary description for Visualizar.
/// </summary>
public class Visualizar : System.Web.UI.Page
{
protected AgenObj.AutorizacionClass
oAgendaAutoCls;
private void Page_Load(object sender,
System.EventArgs e)
{
// Put user code to initialize
the page here
oAgendaAutoCls = new
AgenObj.AutorizacionClass() ;
}

private void Button1_Click(object sender,
System.EventArgs e)
{
..
..

object User_TId = "1";
object User_Id = "79779719";
Scripting.Dictionary sdAfiliado =
(Scripting.Dictionary)oAgendaAutoCls.ConsultaAfili ado
(User_Id,User_TId);
Object oNombre = "Error";
try
{
Object d =
sdAfiliado.get_Item( ref oNombre) ;

if (d.ToString() == "0")
{
oNombre
= "nombre";
d =
sdAfiliado.get_Item( ref oNombre) ;
Label1.Text =
d.ToString();
}
else
{
Label1.Text =
d.ToString();
}
}
catch (System.Exception ex)
{
Label1.Text = "Fallo el
llamado al objeto:\n "+ ex.Message;
}
..
..
..
i'm trying to use pasing the objects like int or strings
(User_TId = 1, User_TId
= "1",User_Id="79779719",User_Id=79779719, and
combinations) and never revive a good return,
what i'm doing wrong?
In some cases i recive a "Object reference not set to an
instance of an object", and others wrong params or not
identified in interface.
ANY SUGGESTION?
Nov 15 '05 #1
0 1381

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

Similar topics

2
by: Tole | last post by:
hi all, i have some doubts in passing variables by references in php. i usually use class blah { function Params( &$params) { $this->params =& $params; } }
12
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
6
by: spammy | last post by:
Hi all, Im attempting to use a COM class in C# via .NET interop. The class has two modes - synhrounous and asynchronous. The mode is determined by the use (or not) of an optional out parameter:...
6
by: Bob Allen | last post by:
I am interfacing to a non .NET app and one of the params is of type variant. In C# it is asking for an object. I went down that path with no luck. I ran across using "marshal as" to convert an...
2
by: Tobias Olbort | last post by:
Hello, i've a outer function, which takes a params-array as a parameter. I want to pass this array to inner function with a params-array (e. g. string.format). When i've passed an integer to...
1
by: Darsin | last post by:
Hi all, I am a new programmer to C# and i am having a following problem. I want to make a single method which takes a variable length array and display it contents. i have defined the method as:...
3
by: Mark | last post by:
Hi From what I understand, you can pass arrays from classic ASP to .NET using interop, but you have to change the type of the.NET parameter to object. This seems to be because classic ASP passes...
13
by: Deano | last post by:
Apparently you can only do this with one value i.e Call MyAssetLocationZoom(Me!txtLocation, "Amend data") This runs; Public Sub MyAssetLocationZoom(ctl As Control, formName As String) On...
0
by: dwinson | last post by:
I am writing an add-in in C# for a server written in VB6. In order for my add-in to work I need to implement this method: MyMethod(string inputData) .... so my C# code looks like this: ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
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...
0
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
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...

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.