|
-
Feb 9th, 2004, 09:33 AM
#1
Thread Starter
Addicted Member
.NET guru types pls help
Ok I have a .NET component trying to be accessed by a VB6 exe. The component will work fine only after I use the Assembly Registration Tool (regasm) from the .NET framework.
BUT it will only work on the PC I run regasm from. If I compile an exe on Computer A (after running regasm) the exe will work fine on Computer A but on Computer B I receive a 429 runtime error. The same is true in the reverse case - The exe compiled on Computer B works fine there, but on Computer A I receive the 429 error.
What am I doing wrong? I know something is wrong with the registration or at least the portability but I am too much of a novice to know what - pls help!
-
Feb 9th, 2004, 09:47 AM
#2
-
Feb 9th, 2004, 10:37 AM
#3
Thread Starter
Addicted Member
Grimfort - thanks for the write up. Unfortunately I don't know how much help it will be. My component is already visible to my VB6 program. All the classes are also visible and pop up when coding. And as I said, once regasm is run on the PC, everything is peachy keen.
Does this mean that my installation is not registering the component properly? Registry entries are created, and like I said its visible to VB, just doesn't really wanna work
-
Feb 9th, 2004, 10:57 AM
#4
Ive not tried it personally, but after creating the tbl file, you need to copy that across as well, follow what the writeup states.
Heres the important part:
=====================
Register the .NET Assembly
You must register the .NET assembly for COM clients to be able to use it. You use the Tlbexp.exe and the Assembly Registration tool (RegAsm.exe) to register the .NET assembly. You can create a .tlb file that COM understands by using Tlbexp.exe. To do this, type the following command at the command prompt:
TlbExp AssemblyName /out:FileName
COM clients refer to this .tlb file when the clients want to talk to the managed assembly. The Tlbexp.exe command-line tool converts the classes and interfaces contained in an assembly to a COM type library. When the type information of the class is available, COM clients can create an instance of the .NET class, and they can call the methods of the instance.
You must register the .NET assembly by using the Regasm.exe tool. Regasm.exe can generate and register a type library when you apply the /tlb: option. COM clients require that type libraries be installed in the Windows registry. Without this option, Regasm.exe only registers the types in an assembly, not the type library. Registering the types in an assembly and registering the type library are distinct activities. To register the .NET assembly, type the following command at the command prompt:
RegAsm AssemblyName /tlb: FileName.tlb
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|