473,657 Members | 2,497 Online
Bytes | Software Development & Data Engineering Community
+ 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 3270
>>>>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.goo gle.com...
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
2384
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 server. This all works fine until I put the dll on a production server (small business server) then register it (without error) using regasm.exe. I get an error message stating "The system cannot find the file specified". The differences between
2
13538
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" selected). Then I can import the TLB into C++ and use the component as a standard COM component, it creates and I can call it's methods. If however, I take the DLL and use REGASM to register the component. I
5
1821
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 COM interop. If I don't include any managed classes in the library, the context help in VB6 lists every single unmanaged class in the class library
0
1736
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 .Net assembly. Just like tlbimp which works on the entire COM Component (check out yesterdays article) tlbexp also works on the entire assembly. The entire assembly is converted at the same time. You cannot use it to
3
15070
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 path\x.dll Got an error, don't recall the text of the error. So my fat fingers went into regedit and tried to delete all keys referring
5
274
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 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...
1
5634
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 from the internal network. I have many interfaces to display message data. But for some unlucky reason, we designed the new interface written in C# to catch a new message which has the different platform compared to messages caught in...
2
5974
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 parameter when registering .net dll with regasm. from what i read,a simple regasm dllname.dll and putting the dll and cscript.exe in the same folder should be sufficient. /codebase should not be required.
3
7867
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 as a COM object. Am I right so far? lets say I create a VB6 app and want to use the .NET dll. Does the installer of the VB6 app have to register the .NET dll by calling Regasm or can the VB6 app call it directly the first time it runs.
0
8392
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8823
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8603
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5632
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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 we have to send another system

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.