I Created a 'Sample.Dll' and 'sample.tlb' file containing a function which returns a value, using Visual Studio 2005 class library for access it in the Microsoft Office Excel's Macro to getting a cells value.
I Set some properties in visual studio 2005 before building the Solution.the Changes are:
- Application -->Assembly Information-->Make Assembly COM visible Check box Checked.
- Compile --> Register for COM interop Check box Checked(Which creates 'Sample.tlb' file)
- Signing --> Sign the Assembly.Check Box Checked(Which creates 'Sample.snk' file)
I Build the Solution and There is three files in the Release folder
Now i place the 'sample.dll' and 'sample.tlb' in the System32 then register the sample.dll on the another machine two times
1. by gacutil /i sample.dll
2. by RegAsm sample.dll
Now I Open the Excel then Create a Macro and add a reference of the 'sample.tlb' from system 32 and Microsoft ActiveX Data Objects 2.1 Library and Microsoft DAO 3.6 Library.
now i create a object of the class file of the DLL.
It returns value in the same machine where the sample.Dll build but on another machine it gives an error when executes the Function and did not return the value of that cells.
the function gave Error Code.
1.Error Code 429
2.Error Code -2147024894
I researched on that two error but did not got any strong result.
why it occurs in any other machine where i did not compile it?
or What step i did not perform.