|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
"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?? >Question: is there any way or trick for binding the object to the Not sure what you mean by binding exactly, but it sounds like a>interface so that I can debug the program more speedily and access its >methods more easily?? 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. On Nov 26, 11:12 pm, Mattias Sjögren <mattias.dont.want.s***@mvps.org>
wrote: Show quoteHide quote > >Question: is there any way or trick for binding the object to the That did it -- thanx> >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.
Disecting Strings
Fastest way to import large fixed width file into a DataTable OT - Vista Search and Recursive GetFiles Setting up Policies to run Exe file from network drive XML Deserializer problem DLL NOT FOUND (but only on certain systems???) Multithreading Invoke Workaround Is setting Bounds Property the same as setting Size and Location? References to different versions of MS Outlook in a VB.NET application Convert code line to VB |
|||||||||||||||||||||||