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.C itas
{
/// <summary>
/// Summary description for Visualizar.
/// </summary>
public class Visualizar : System.Web.UI.P age
{
protected AgenObj.Autoriz acionClass
oAgendaAutoCls;
private void Page_Load(objec t sender,
System.EventArg s e)
{
// Put user code to initialize
the page here
oAgendaAutoCls = new
AgenObj.Autoriz acionClass() ;
}
private void Button1_Click(o bject sender,
System.EventArg s e)
{
..
..
object User_TId = "1";
object User_Id = "79779719";
Scripting.Dicti onary sdAfiliado =
(Scripting.Dict ionary)oAgendaA utoCls.Consulta Afiliado
(User_Id,User_T Id);
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.Excepti on 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="79 779719",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?
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.C itas
{
/// <summary>
/// Summary description for Visualizar.
/// </summary>
public class Visualizar : System.Web.UI.P age
{
protected AgenObj.Autoriz acionClass
oAgendaAutoCls;
private void Page_Load(objec t sender,
System.EventArg s e)
{
// Put user code to initialize
the page here
oAgendaAutoCls = new
AgenObj.Autoriz acionClass() ;
}
private void Button1_Click(o bject sender,
System.EventArg s e)
{
..
..
object User_TId = "1";
object User_Id = "79779719";
Scripting.Dicti onary sdAfiliado =
(Scripting.Dict ionary)oAgendaA utoCls.Consulta Afiliado
(User_Id,User_T Id);
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.Excepti on 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="79 779719",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?