-
Late Binding in C#
I have an object that can only be communicated with via late binding (I'm
assuming it's all about the IDispatch interface). It's type library is of no
use as this object cannot be cast to any of the types listed in the TLB
file.
I already know how to operate this object in VB6 but I can't figure out how
to work with it in C#. For example this object has an Items collection. In
VB6 it was simple as obj.Items("nth"). How can I do the same in C#?
--
"There are 10 kinds of people:
Those who understand binary and those who don't"
http://www.acadx.com
http://vbxtender.sourceforge.net
-
Re: Late Binding in C#
Okay, I've come across <object>.GetType().InvokeMethod and it looks rather
promising. But there's a problem: some of the methods I need to invoke
require an out parameter. InvokeMethod accepts an arry of objects as
arguments to the method you're invoking.
Any idea how I can pass an out parameter via an array?
--
"There are 10 kinds of people:
Those who understand binary and those who don't"
http://www.acadx.com
http://vbxtender.sourceforge.net
-
Re: Late Binding in C#
I *think* that the out parameter will be in the array you passed when the
call returns.
--
Visit the C# product team at http://www.gotdotnet.com/team/csharp
This posting is provided "AS IS" with no warranties, and confers no rights.
"Frank Oquendo" <nospam@please.com> wrote in message
news:3d55c1a8@10.1.10.29...
> Okay, I've come across <object>.GetType().InvokeMethod and it looks rather
> promising. But there's a problem: some of the methods I need to invoke
> require an out parameter. InvokeMethod accepts an arry of objects as
> arguments to the method you're invoking.
>
> Any idea how I can pass an out parameter via an array?
>
> --
> "There are 10 kinds of people:
> Those who understand binary and those who don't"
> http://www.acadx.com
> http://vbxtender.sourceforge.net
>
>
-
Re: Late Binding in C#
Eric Gunnerson had this to say:
> I *think* that the out parameter will be in the array you passed when
> the call returns.
Found it: pass null for the args parameter.
--
There are 10 kinds of people:
Those who understand binary and those who don't
http://www.acadx.com
http://vbxtender.sourceforge.net
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks