Ealier we have seen some articles to register a.Net assembly into GAC using either gacutil.exe or RegAsm.exe.
![]() Register Assembly With Regasm Using Shield Registration Into GACRegister Assembly With Regasm Using Shield Code Drives TheNameGAC MyGACControl.dll KeyPathyes Assembly.net The highlighted text - NameGAC Assembly.Net, in the above code drives the.Net assembly registration into GAC.
Read the following related articles: How to register a.Net assembly into GAC in a development environment. You can do this manually or you can write methods in your ActiveX that will do that for you when you register it with tools like regasm Now I want to ask you, why is it so neccesary to use RegisterClass and UnRegisterClass methods to register, since I could successfully get the same result with simply creating the.snk file and registring manually using the command regasm codebase.dll. I am using Win7 32-bit. Everything that is in this article can be found on the Web, but believe me this is not so easy;). In summary, what we need is to create a class that will be marked with those attributes. To create a new GUID, you can use the tool in Visual Studio Tools - Create GUID ComVisible tells that our class can be used as COM object. You can do this manually or you can write methods in your ActiveX that will do that for you when you register it with tools like regasm. To create new SNK, you can use tool: sn.exe (you can find it in the.NET SDK). This is the place where the installation program (wrapped in CAB) should be placed. Open is just a name of the method, it can be named anything that you can think of. First of all, you have to create a setup program that will either be MSI or it will wrap MSI into setup.exe file. I have done this by using InstallShield application because this is what my company standard was, but you can use Visual Studio to do that (although I have never tested it). The important thing is that your setup has to register your ActiveX on a target computer. In our case, there is only one setup.exe file that is mapped by section with the same name. It is saying that file that it is mapped to should be launched when accessed with proper clsid. In this case, this is the MyGuid that is defined in our C code and also in tag. Every new event that will be available for COM must be marked DispId attribute. The tlb and cab files have been created, and the web install actually works. Neat. I am also able to connect to the ActiveX dll using a Windows.Net app I wrote to test the DLL. This error comes only on those machines where dotnet 3.5 is installed. On 4.0 machines it works. I am pretty sure that code is developed in dotnet 2.0 as i copied from your blog and also checked properties to ensure its 2.0. Please help me with this. I tried creating setup file but to create setup file i need exe which is not there in my bin, my bin has dll and tlb file after registration. Now converting dll or tlb to setup file looks quite difficult as i searched lot of blogs but i am not able to get anything. Register Assembly With Regasm Using Shield How To Create SetupPlease tell me how to create setup file from dll or tlb file which is their in my bin file. Current version property is a filed in ActiveX class Site 1: Version 1.0 Site 2: Version 2.0 Hit Site 1 Version 1.0 is shown on the page Without closing IE, hit Site 2 Still Version 1.0 is shown. It should be Version 2.0. IE version is 9 Thanks. The problem when i tried it on another machine it didnt work All what i did that i took setup.exe and ini file into.cab file and i took the cab file and the html page and tried to run it on the other machine, it request to allow the cab file to run, when i press yes it doesnt do anything and then error message Object doesnt support property or method Open what shall i do. When DLL is registered on the machine that runs it, not using cab, how do I get rid of the IE message about ActiveX might not be safe. ActiveX control was not working when we browse the html or aspx page, so please can any one help me to get the out put in the browser. You wrote: Registering COM object means that you need to make some entries in the registry. You can do this manually or you can write methods in your ActiveX that will do that for you when you register it with tools like regasm Now I want to ask you, why is it so neccesary to use RegisterClass and UnRegisterClass methods to register, since I could successfully get the same result with simply creating the.snk file and registring manually using the command regasm codebase.dll. I am using Win7 32-bit.
0 Comments
Leave a Reply. |