DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Mon, 20 Aug 2007 12:46:00 -0700,    posted on: microsoft.public.dotnet.framework.interop        back       

Thread Index
  1    Chris Davoli
          2    Phill W. p-.-a-.-w-a-r-d-@-o-p-e-n-.-a-c-.-u-k
                 3    Chris Davoli
                 4    Phill W. p-.-a-.-w-a-r-d-@-o-p-e-n-.-a-c-.-u-k


Newbie to COM Interop   
I'm trying to just learn how to call a COM component from a .Net application. 
I am using visual studio 2005. Is there some sort of step by step tutorial or 
book or something that somone can suggest. I'm real confused on how to do 
this and just googleing does not get me a real good clear answer. 

 Anybody out there to help me?

-- 
Chris Davoli
Date:Mon, 20 Aug 2007 12:46:00 -0700   Author:  

Re: Newbie to COM Interop   
Chris Davoli wrote:


> I'm trying to just learn how to call a COM component from a .Net application. 


At its /most/ simple, add a reference to the COM component; Visual 
Studio will create you an InterOp Assembly (local to your current 
project) that allows you to call the methods on the COM object and wires 
up any necessary data type conversions and the like.

Beyond that, you're looking at the "tlbimp" utility (if you need to put 
/your/ Assemblies into the Global Assembly Cache then you'll need tlbimp 
to "Strongly Name" the generated InterOp Assembly).

And, if you're playing with automating MS Office then you'll need to 
read up on its "Primary InterOp Assemblies".

HTH,
    Phill  W.
Date:Tue, 21 Aug 2007 13:13:06 +0100   Author:  

Re: Newbie to COM Interop   
Thanks Phil. 

So what your saying, if I want to just call the com component, just adding a 
reference to it in the local project without GAC'ing it, will do it. Is that 
true? Sounds pretty easy.

-- 
Chris Davoli



"Phill W." wrote:


> Chris Davoli wrote:
> 
> > I'm trying to just learn how to call a COM component from a .Net application. 
> 
> At its /most/ simple, add a reference to the COM component; Visual 
> Studio will create you an InterOp Assembly (local to your current 
> project) that allows you to call the methods on the COM object and wires 
> up any necessary data type conversions and the like.
> 
> Beyond that, you're looking at the "tlbimp" utility (if you need to put 
> /your/ Assemblies into the Global Assembly Cache then you'll need tlbimp 
> to "Strongly Name" the generated InterOp Assembly).
> 
> And, if you're playing with automating MS Office then you'll need to 
> read up on its "Primary InterOp Assemblies".
> 
> HTH,
>     Phill  W.
> 
Date:Tue, 21 Aug 2007 08:44:05 -0700   Author:  

Re: Newbie to COM Interop   
Chris Davoli wrote:


> So what your saying, if I want to just call the com component, just adding a 
> reference to it in the local project without GAC'ing it, will do it. 

Yes.

> Is that true? 


It's certainly worked for me in the past.
Mind you, I tend to work with components that are reused machine-wide, 
so I end up putting things into the GAC anyway.


> Sounds pretty easy.


Of /course/ it is - this is Visual Studio  :-)

I does all /sorts/ of "Good Things" for you, without you even having to 
know what they are...   Yeah; right!  ;-)

Regards,
    Phill  W.
Date:Wed, 22 Aug 2007 09:48:27 +0100   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us