Click here to Skip to main content
15,912,507 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

My Application is been developed using multi-technology viz., C++ Win32 Dll, ATL-COM- Dll's & .Net Dll's(Assemblies), and my task is involved with Registration of Dll's, I had modified the COM-Dll's using adding Interface/method and used "RegSvr32.exe \\path of dll\xyz.dll for Registration, and basically the COM -Dll was identified, using DllRegisterServer attribute. and used DoComRegistration() and DoComUnregistration() API's for Registration/De-Registration of COM-Dll's

Query:

I am also working on .Net Dll's/Assemblies, I need to know whether similar API's exist in .Net to effect Registration?

My understanding is if abc.dll needs to be registered in .Net domain. <<GacUtils.exe /I abc.dll>> coincidentally installs & registers the abc.dll in GacUtils path (%WinDir%/Assemblies) in the system. Is there any other mechanism to effect the same in .Net .i.e.., any API similar to DllRegisterServer() & DllUnRegisterServer() as in ATL-COM exists

Since, I am new to .Net domain , I need to obtain more information on Dll's/Assemblies/tools and API's available in the .Net Platform. to perform Registration/De-Registration of Dll's.

Also, I had come to know .net dll's does not require Registration at all ? If it is untrue , Under what circumstances does such Dll's(.Net) require Registration/De-Registration, and what methodology/API exists to effect the same.

Details:

I am using VS2008 IDE, Windows 7 o/s

Any help in resolving the above would be appreciable.

Thanks,

VishaK_90















.
Posted

1 solution

This is a good and concise tutorial about how to create and deploy com-visible .net assamblies: http://jumbloid.blogspot.fr/2009/12/making-net-dll-com-visible.html[^]. But that is needed only if your component in the assambly is interoperating with non-dotnet host, that identifies the component from registry and it is not searching for it and loading it on it's own.
.NET has it's own view about how to come out from the dll hell. GAC[^] is only one approach of it. In general you don't need to register an assambly in the GAC to use it; GAC holds the often used and framework wide assamblies (with version) but it has some other features related to origin based security.
You have several other tools to deal with the mess of assamblies you might need to handle:
- the resolution mechanism: http://msdn.microsoft.com/en-us/library/yx7xezcf(v=vs.100).aspx[^], that implies location but also strong names[^].
- you can use reflection to dynamically load assambly at runtime: http://msdn.microsoft.com/en-us/library/25y1ya39.aspx[^]
- there are several plug-in frameworks for .net like MEF and MAF, but many third party ones too
- but of course, you can still use COM interop
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900