473,472 Members | 1,882 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

REGASM interop bug

This can be reproduced with VS.NET as follows. Create a new ATL
project with default wizard settings (dll, attributed). To the
'module' attribute, add a specifier 'version = "1.10" ' alongside the
name, uuid etc. specifiers. Build the dll. Use tlbimp to create a
primary interop assembly for it. Register that assembly using regasm.
The registry entries for the primary interop dll are inserted wrongly.
The original DLL has its typelib correctly registered under a registry
sub-key "1.a". Regasm incorrectly inserts a new registry sub-key
"1.10" under the same parent key. Regasm is formatting the sub-key
name in decimal, when it should be in hex. This breaks typelib loading
in some circumstances.

I've been looking for information on this bug, on workarounds or
fixes, and for places to report it to MS. Any help?

Kevin Flanagan.
Jul 21 '05 #1
5 3242
>>>>Regasm incorrectly inserts a new registry sub-key "1.10" under the same
parent key.

If you're referring to a 1.10 key under the InprocServer32 key, that is correct
behavior, new on 1.1. Look at the .NET Framework Development topic
"Version-Dependent Registry Keys"
--
Phil Wilson [MVP Windows Installer]
----
"Kevin Flanagan" <ke************@bom.co.uk> wrote in message
news:da**************************@posting.google.c om...
This can be reproduced with VS.NET as follows. Create a new ATL
project with default wizard settings (dll, attributed). To the
'module' attribute, add a specifier 'version = "1.10" ' alongside the
name, uuid etc. specifiers. Build the dll. Use tlbimp to create a
primary interop assembly for it. Register that assembly using regasm.
The registry entries for the primary interop dll are inserted wrongly.
The original DLL has its typelib correctly registered under a registry
sub-key "1.a". Regasm incorrectly inserts a new registry sub-key
"1.10" under the same parent key. Regasm is formatting the sub-key
name in decimal, when it should be in hex. This breaks typelib loading
in some circumstances.

I've been looking for information on this bug, on workarounds or
fixes, and for places to report it to MS. Any help?

Kevin Flanagan.

Jul 21 '05 #2
I think you may have misconstrued my message. I'm not saying that regasm
should not place anything like that in the registry (as you rightly say,
the topic you mentioned explains that it does). The problem is that it
formats it wrong. If you try it with type libraries numbered 1.0 to 1.9,
regasm puts its primary interop details in the same sub-key as COM's
details for the type library. If you try it with a type library numbered
1.10 (or above), COM registration for the original typelib stores
details under sub-key '1.a' while regasm inserts a parallel sub-key
'1.10'. This then stops some COM clients from being able to load the
type library (I imagine they look for the highest entry in the registry,
and consider '1.10' to be higher than '1.a', since the entries are meant
to be in hex, but regasm inserts them in decimal). This breaks two of
our type libraries under repeatable (though complex) circumstances, but
we can 'hack' it back again if we manually insert details under the
erroneous '1.10' sub-key for COM, i.e. the same details as under the
'1.a' sub-key. I can't see anything in the topic you've mentioned that
could make regasm's behaviour 'correct', plus in any case it does
actually break systems, but do tell me if you do know of some reason for
this being correct (and if so, how to stop it breaking COM clients as
described above). Thanks for the feedback so far.

Kevin Flanagan.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #3
Kevin,
I've been looking for information on this bug, on workarounds or
fixes, and for places to report it to MS. Any help?


Yes it's a bug, and it was fixed in v1.1 of the framework. It might
also be fixed by some of the v1.0 Service Packs, I don't remember for
sure.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
Jul 21 '05 #4

Well - that's odd, it's v1.1 I have installed (I never installed 1.0)
... VC++ 'About' dialog reports "Microsoft .NET Framework 1.1 Version
1.1.4322". Do you happen to have any references to MS information on
this bug and what versions/downloads/etc. fixes it? I've been looking
for such info with no luck so far. Thanks for your help and any more
info.

Kevin Flanagan.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #5
Kevin,
Well - that's odd, it's v1.1 I have installed (I never installed 1.0)
Sorry, my bad, it was not fixed in v1.1, I must have been thinking of
some other bug.

But it is fixed in v1.2/v2.0 alpha release, I actually verified it
this time.

Do you happen to have any references to MS information on
this bug and what versions/downloads/etc. fixes it? I've been looking
for such info with no luck so far.


Here's at least a confirmation that it is indeed a known bug.

http://discuss.develop.com/archives/...ET-CLR&P=R4472

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: awk | last post by:
I have a dll built with c# in VS.net and Register for COM interop is set to true. This builds fine on my xp development machine and the dll output is used by a User defined function in sql...
2
by: Andy Bates | last post by:
Hi - I have a C# .NET assembly that exposes a COM interface (basically has an interface and class with Guid attributes). If I compile this under VS.NET (with the "Register for COM Interop"...
5
by: Anthony Evans | last post by:
Greetings I'm using VC++.NET to create a class library. The class library contains managed classes that wrap legacy unmanaged classes by the same name. I use regasm to register the DLL for...
0
by: Namratha Shah \(Nasha\) | last post by:
Hey Guys, TlbExp.exe and Regasm.exe tools aid us in exporting assembly information to a type library so that non .Net Applications or unmanaged code use this type library information to call...
3
by: Howard Kaikow | last post by:
I was playing with a COM example in an article at the MSFT web site. This resulted in a DLL, call it x.dll, getting registered. When I was done, I tried to unregister the dll using regasm /u...
5
by: Kevin Flanagan | last post by:
This can be reproduced with VS.NET as follows. Create a new ATL project with default wizard settings (dll, attributed). To the 'module' attribute, add a specifier 'version = "1.10" ' alongside the...
1
by: trantanm | last post by:
Hello everybody, I am getting in the tough issue in my application. I hope I can get some advice from you. My application CatchAllMessages is mainly written in C++ and is used to catch messages...
2
by: xamman | last post by:
hi there, i am trying to use a .NET assembly from a Cscript.exe .vbs (i.e. from COM) and could not get my .vbs to use my .net dll (gives a 'file not found error') unless i used the /codebase...
3
by: Lou | last post by:
I know I can make an ActiveX dll in .NET and it uses interop. So I end up with 2 files, the .dll and the interop file. I also know I need to use Regasm or something like that to register the .dll...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.