By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,183 Members | 1,212 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,183 IT Pros & Developers. It's quick & easy.

REGASM interop bug

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
>>>>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

P: n/a
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

P: n/a
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

P: n/a

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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.