variant

G

Guest

My vb function in com+ is:

public Function updatestatus(byval MessageControlIDas string ,byval Status
as string,byref ErrMessage as variant, optional byval QueueErrorMessage as
string ="")as variant

I am trying to call this through com interop:

object ReturnedValue;

ReturnedValue = HVOUTInstance.UpdateStatusByMCID(MessageControlID,
Status,ErrMessage, QueueErrorMessage);

I get an error saying " cannot convert from 'object' to ref object'

what should I do?

thanks
 
J

John Timney \(Microsoft MVP\)

Object is the closest thing to it, since every thing in .NET - including
primitive data types - is an object, a variable of object type can point to
any data type.

You should however get used to using strongly defined types like string, int
etc and use object sparingly, for good practice if nothing else. Hard to
bebug a huge list of objects.

--
Regards

John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top