473,942 Members | 17,048 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"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("e tc") 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 1648
>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(CreateObj ect(...), 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.w ant.s...@mvps.o rg>
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(CreateObj ect(...), IFoo)

Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.orghttp://www.msjogren.ne t/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
3873
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)))) (let ((x 4)) (f 5))))
3
2251
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 change on an assembly which does not change any interface at all, if it is not then possible to let your other assemblies use the new one automagically?
2
325
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 etc. How I can create that object but I don't want any static properties in source code. I implemented IDataBinding in my object but when I'm binding my TextBox to this data object than my application raise exception which tell me that my object...
1
1538
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 database connection; opens db on page_onload and closes db on page_unload. But so that the connection object is as easily accessible from all subpages and other user controls I'd like to somehow "bind" it to the top level Page class. Otherwise I...
3
1275
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 unlikely how do u actually send the values to the db - any repeater specific article is more than welcome"
2
1706
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 (interface) and I will have main program using those DLL's. I want to achieve when I won't have to recompile main program and be able to add modules by dropping them into folder. Then
1
2109
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. "Clientes.Existe"- So, to reference this object, it was simplier to me resolving this with reflection, and it was something like this:
0
1303
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 "Option Strict On disallows late binding" If I comment out the line and get to that place in the debugger, I can pull
0
872
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 (of an example): Source: byte array, content=243 123 45 98 12 Destination: a string containing hex representation of the values, seperated by blanks: "F3 7B 2D 98 0C"
0
9969
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11531
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11120
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11298
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10661
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9863
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8219
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6087
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...

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.