Click here to Skip to main content
15,902,635 members
Home / Discussions / C#
   

C#

 
AnswerRe: Recording from moden using TAPI? Pin
Ray Cassick5-Feb-04 9:48
Ray Cassick5-Feb-04 9:48 
GeneralBest way to copy byte[] to string Pin
illsorted5-Feb-04 8:59
illsorted5-Feb-04 8:59 
GeneralRe: Best way to copy byte[] to string Pin
Kentamanos5-Feb-04 9:25
Kentamanos5-Feb-04 9:25 
GeneralRe: Best way to copy byte[] to string Pin
illsorted5-Feb-04 9:33
illsorted5-Feb-04 9:33 
Generalporting quke2 to c# Pin
Peter Reiter5-Feb-04 8:26
Peter Reiter5-Feb-04 8:26 
GeneralRe: porting quke2 to c# Pin
Heath Stewart5-Feb-04 18:20
protectorHeath Stewart5-Feb-04 18:20 
QuestionReally no way to free an object ? Pin
Andres Coder5-Feb-04 8:07
Andres Coder5-Feb-04 8:07 
AnswerRe: Really no way to free an object ? Pin
boogs5-Feb-04 8:51
boogs5-Feb-04 8:51 
AnswerRe: Really no way to free an object ? Pin
scadaguy5-Feb-04 8:53
scadaguy5-Feb-04 8:53 
GeneralRe: Really no way to free an object ? Pin
Andres Coder5-Feb-04 9:23
Andres Coder5-Feb-04 9:23 
GeneralRe: Really no way to free an object ? Pin
scadaguy5-Feb-04 9:38
scadaguy5-Feb-04 9:38 
GeneralRe: Really no way to free an object ? Pin
Andres Coder5-Feb-04 9:45
Andres Coder5-Feb-04 9:45 
GeneralRe: Really no way to free an object ? Pin
scadaguy5-Feb-04 13:56
scadaguy5-Feb-04 13:56 
GeneralCan't call a method with parameters when opening a thread Pin
Peter Mills5-Feb-04 7:27
Peter Mills5-Feb-04 7:27 
GeneralRe: Can't call a method with parameters when opening a thread Pin
Bill Dean5-Feb-04 8:39
Bill Dean5-Feb-04 8:39 
GeneralRe: Can't call a method with parameters when opening a thread Pin
boogs5-Feb-04 8:42
boogs5-Feb-04 8:42 
GeneralRe: Can't call a method with parameters when opening a thread Pin
Heath Stewart5-Feb-04 18:04
protectorHeath Stewart5-Feb-04 18:04 
GeneralRe: Can't call a method with parameters when opening a thread Pin
Peter Mills7-Feb-04 14:26
Peter Mills7-Feb-04 14:26 
Generalremoving registry garbages Pin
Shahin775-Feb-04 6:23
Shahin775-Feb-04 6:23 
GeneralRe: removing registry garbages Pin
Heath Stewart5-Feb-04 6:38
protectorHeath Stewart5-Feb-04 6:38 
The reason you see multiple typelib references is because they are using different GUIDs, so even if such a function existed (which it doesn't, but it isn't hard to create) it would be effective because each typelib is registering with a different GUID (otherwise you wouldn't see multiple references).

Remove them manually by searching for your typelib using regedit.exe.

The thing to do is eliminate the problem. You MUST use hard-coded GUIDs using the GuidAttribute for all classes and interfaces that are exposed as COM objects and interfaces. The GUID on the interface should NEVER change. If you need a new interface, implement the previous version of the interface and create a new one (like IMyInterface2), giving it a new GUID. The class GUID should typically not change.

To solve your immediately problem, you should also use an assembly-level GuidAttribute for your assembly, which is used as the typelib ID when a typelib is generated:
[assembly: Guid("cac7a0f0-c3a7-4039-abd7-1bc55b924bd7")]
(Generate your own, though)

When you register your class using regasm.exe /tlb <filename> now, the typelib will always have the same GUID and only the last path you registered will exist in the registry.

You should read those links I gave a while back discussing exposing .NET controls as COM objects. It does discuss this as well.

 

Microsoft MVP, Visual C#
My Articles
GeneralJava vs. C# means file watcher problems Pin
RB@Emphasys5-Feb-04 6:22
RB@Emphasys5-Feb-04 6:22 
GeneralRe: Java vs. C# means file watcher problems Pin
Heath Stewart5-Feb-04 6:47
protectorHeath Stewart5-Feb-04 6:47 
GeneralRe: Java vs. C# means file watcher problems Pin
RB@Emphasys5-Feb-04 7:08
RB@Emphasys5-Feb-04 7:08 
GeneralWeb Service error Pin
Peter Greenall5-Feb-04 5:55
Peter Greenall5-Feb-04 5:55 
GeneralImpersonation and FileSystemWatcher (threading?) Pin
Bill Dean5-Feb-04 5:47
Bill Dean5-Feb-04 5:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.