Solved

How to make interop registration free?

Posted on 2012-03-12
8
252 Views
Last Modified: 2012-03-20
In my application we have COM component, .Net components and there are tlbs for which the interop gets generated. These tlbs get register at the time of installation. We need to make it application to run registration free. I am able to run it for COM components and .net components.
Now I need to make the tlbs also registration free, anyone knows how to achieve it.

Thanks in advance.
0
Comment
Question by:MrunalM
  • 4
  • 4
8 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 37710937
If you have .NET 4.0, it has the ability to embedded COM interop type libraries.  If you don't have it, then I have no idea how you would achieve that.
0
 

Author Comment

by:MrunalM
ID: 37712955
Hi TheLearnedOne,
Thanks for your reply.
I want to know how side by side configuration works for interop?
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 37714273
Can you give me an example of what you mean by "side-by-side" with COM?  Are you talking about something like Word 2007 and Word 2010?  These are distinct type libraries, and each one would have a different reference in a .NET project, and would be embedded differently.  Embedding interop type libraries within a .NET assembly is not 100% perfect.  There are times when you are suggested to turn off embedded interop references.
0
 

Author Comment

by:MrunalM
ID: 37718432
COM components gets registered in system registry. In side by side configuration we remove the dependency on registry by adding all the details in manifest file. Basically side by side configuration is used to overcome the problem of DLL hell.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 96

Expert Comment

by:Bob Learned
ID: 37722577
With embedded COM interop, the type libraries are loaded into the assembly, and that removes the need for registration in the system registry.  Therefore, you should be able to use any COM component that can be embedded.

Advanced COM Interoperability
http://msdn.microsoft.com/en-us/library/bd9cdfyx.aspx

There are references to side-by-side and embedded COM.
0
 

Accepted Solution

by:
MrunalM earned 0 total points
ID: 37728043
I have added my tlb details in my application manifest (i.e. app_name.exe.manifest) as follows.

 <file name="tlb_name.tlb">
    <typelib tlbid="{D897017D-EC6A-4E42-8D89-245BBCDB446F}" version="1.0" helpdir="1.0 Type Library"/>
  </file>
  <comInterfaceExternalProxyStub name="InterfaceName" iid="{FB0FF818-0FF9-67AB-BFAE-35CB56E10851}" tlbid="{D897017D-EC6A-4E42-8D89-245BBCDB446F}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>

If I unregister my tlb, my application is working.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 37728738
How is that any different from embedding a COM reference in the assembly?  Are you saying that you don't have 4.0?  COM references in 4.0 are added with Embedded COM Interop = true by default.
0
 

Author Closing Comment

by:MrunalM
ID: 37741301
My application is working with this solution
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now