473,396 Members | 2,106 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 3238
>>>>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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.