473,320 Members | 1,916 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,320 software developers and data experts.

"Binding" an interface to an object definition in vb.net??

Im still confused with interfaces for COM objects. I have a Lotus
word processor that I'm trying to automate via vb.net. The exe comes
with an interface that I can add as a reference .. but.. I cannot
seem to generate an instance of it because (error message) the .tlb
file only provides the interface. Thus I use CreateObject("etc") to
define an object that picks up the exe.

Question: is there any way or trick for binding the object to the
interface so that I can debug the program more speedily and access its
methods more easily??
Nov 26 '07 #1
2 1623
>Question: is there any way or trick for binding the object to the
>interface so that I can debug the program more speedily and access its
methods more easily??
Not sure what you mean by binding exactly, but it sounds like a
regular cast should do it.

Dim x As IFoo = CType(CreateObject(...), IFoo)
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 27 '07 #2
On Nov 26, 11:12 pm, Mattias Sjögren <mattias.dont.want.s...@mvps.org>
wrote:
Question: is there any way or trick for binding the object to the
interface so that I can debug the program more speedily and access its
methods more easily??

Not sure what you mean by binding exactly, but it sounds like a
regular cast should do it.

Dim x As IFoo = CType(CreateObject(...), IFoo)

Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.orghttp://www.msjogren.net/dotnet/|http://www.dotnetinterop.com
Please reply only to the newsgroup.
That did it -- thanx
Nov 29 '07 #3

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

Similar topics

1
by: Rob Hunter | last post by:
Is there an equivalent to Scheme's LET in Python? LET creates a new binding in the current environment. For example, here's some Scheme code: (let ((x 3)) (let ((f (lambda (arg) (* arg x))))...
3
by: pieter.breed | last post by:
Hi All, It seems as if whenever you rebuild a .net class library you have to rebuild /everything/ which references it. Is this so? I am wondering what happens when you are only doing a minor...
2
by: Boniek | last post by:
Hi, How I can create property to binding with other objects. I want to create a data object which work as a DataTable. DataTable contains columns and dataTable is used to binding with a textBox...
1
by: Davíð Þórisson | last post by:
asking a lot these days... how would I ever learn .Net without the newsgroups!! Well I'm stuck on yet another point. All pages on my web have a user control (initialise) that handles for example...
3
by: Coldman | last post by:
which was saying this: "i have an asp:repeater - its values r initialezed w/ a .DataBind() call does it mean any changes user makes on the page will automaticly go to the database? quite...
2
by: Katit | last post by:
Hello, I searched archives and all pointing to use of VB6 objects from C# I want something different. 1. How can I build expandable platform? Let's say DLL's will have common set of methods...
1
by: nelsonivan | last post by:
Hi, i'm trying to reference some objects using reflection and Late Binding accessing. The Object API to his methods it's easy to understand, and it's as "Object.Method" - aka....
0
by: Ronald S. Cook | last post by:
Hi, I'm wanting to iterate over a generic IList, but the code won't compile because the blue sqiggle line under: _DataRow("SecurityFunctionName") = _IList(i).SecurityFunctionName; sez...
0
by: Armin Zingler | last post by:
<Just_a_fan@home.netschrieb After having longer discussions about a similar issue, I ask you to provide an example of the source and destination value(s) and their data types. Thanks. Example...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.