Hi,

I have a question about a com component (.dll) in Visual studio .net.

After I reference a com component, VS.net puts a wrapper on it and the new
dll is in my bin folder. I notice that the com dll isnâ??t in that same folder.

So, my questions are, after the wrapper is on the dll, do I still need the
com component to run this app? If so, how can I tell after I reference the
dll in my app what version and path the dll is coming from.

And when I deploy this app, do I need to add the com component and register
them?

Thanks

Andre

Re: Com component in VS.net by Egbert

Egbert
Wed Sep 21 16:48:15 CDT 2005


"André" <Andr@discussions.microsoft.com> wrote in message
news:8FF928B3-4B9F-4C03-B8FA-60B9DCD70914@microsoft.com...
> Hi,
>
> I have a question about a com component (.dll) in Visual studio .net.
>
> After I reference a com component, VS.net puts a wrapper on it and the new
> dll is in my bin folder. I notice that the com dll isnâ??t in that same
> folder.

That's right, that could be any directory. The wrapper, just does a
createobject on the ClassID your COM component exposes.

> So, my questions are, after the wrapper is on the dll, do I still need the
> com component to run this app? If so, how can I tell after I reference the

Sure.

> dll in my app what version and path the dll is coming from.

No, you can't. If you want to know where the actual dll is coming from, you
should read the registry. This might be a bad practice.
You also can create a method or function in your COM dll, which calls
GetModuleFileName() (from kernel32).


> And when I deploy this app, do I need to add the com component and
> register
> them?

Sure, you need to use regsvr32 on the COM Dll.

The wrapper is only doing some 'low-level' .NET calls around your COM dll.

> Thanks
>
> Andre
>


Re: Com component in VS.net by Ollie

Ollie
Thu Sep 22 04:06:26 CDT 2005

further to what Egbert has said you can find more information at the
following:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/whypriinterop.asp

check out the following title 'Register COM Classes Locally'
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/tdlg_ch4.asp

HTH

Ollie Riches

"André" <Andr@discussions.microsoft.com> wrote in message
news:8FF928B3-4B9F-4C03-B8FA-60B9DCD70914@microsoft.com...
> Hi,
>
> I have a question about a com component (.dll) in Visual studio .net.
>
> After I reference a com component, VS.net puts a wrapper on it and the new
> dll is in my bin folder. I notice that the com dll isn't in that same
> folder.
>
> So, my questions are, after the wrapper is on the dll, do I still need the
> com component to run this app? If so, how can I tell after I reference the
> dll in my app what version and path the dll is coming from.
>
> And when I deploy this app, do I need to add the com component and
> register
> them?
>
> Thanks
>
> Andre
>



RE: Com component in VS.net by jch

jch
Thu Sep 22 05:21:02 CDT 2005

You no longer necessarily need to register the COM components with regsvr32.
You can also use registration free COM components:
http://msdn.microsoft.com/netframework/default.aspx?pull=/library/en-us/dndotnet/html/rfacomwalk.asp

HTH, Jakob.
--
http://www.dotninjas.dk
http://www.powerbytes.dk


"André" wrote:

> Hi,
>
> I have a question about a com component (.dll) in Visual studio .net.
>
> After I reference a com component, VS.net puts a wrapper on it and the new
> dll is in my bin folder. I notice that the com dll isnâ??t in that same folder.
>
> So, my questions are, after the wrapper is on the dll, do I still need the
> com component to run this app? If so, how can I tell after I reference the
> dll in my app what version and path the dll is coming from.
>
> And when I deploy this app, do I need to add the com component and register
> them?
>
> Thanks
>
> Andre
>