473,573 Members | 2,538 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem in generating .Tlb file form .NET 2005 assemblies

Hi all,
The type library is an important file for COM interop, without which
unmanaged code can't interact with managed code.
When I use .NET 2003, I can sucessfully generate .tlb file from a .NET Dll
(built with /clr:oldsyntax switch) - using tlbexp or Regasm /tlb.
The above technique never works for .NET 2005. (Both for Beta1 & Beta2).
The thing is that a .tlb file gets generated with an empty library statement
block, ano NO types are exported in the .tlb file.

We tried it several time in our HCLT lab using the tlbexp or the Regasm
utility which comes with .NET 2005. We also tried with the older vertion of
the regasm or tlbexp - but nothing works.
Where is the problem ? is it in the latest version of the IDE or with the
latest tlbexp or regasm utility?

Please advice

Sincerely
Sanjoy Sinharoy
HCLT - INDIA

Jul 22 '05 #1
2 2090
I don't have 2005 in front of me now, but I think there is an attribute
that must be applied to each public method that needs to be exposed to
COM. I think it is called ComVisible.

So you might have (in VB.Net code here):

<ComVisible(Tru e)> _
Public Sub ExposedToCom()
. . .
End Sub

Jul 22 '05 #2
Thanks Chris, You are right. It works.

Regards
Sanjoy
"Chris Dunaway" wrote:
I don't have 2005 in front of me now, but I think there is an attribute
that must be applied to each public method that needs to be exposed to
COM. I think it is called ComVisible.

So you might have (in VB.Net code here):

<ComVisible(Tru e)> _
Public Sub ExposedToCom()
. . .
End Sub

Jul 22 '05 #3

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

Similar topics

6
3303
by: Iain Bishop | last post by:
I'm trying to model objects for the following problem: A building site contains assemblies, each of which can contain other assemblies and/or materials. I have modelled this using a Site class, Assembly class, and Material class as follows... Site Class (clsSite): Option Explicit
15
2410
by: Ken Allen | last post by:
I have been developing a suite of assemblies over the past couple of weeks, and this afternoon somethign started misbehaving. If I do not run the IDE and compiler the code from the command line, the compilation seems to work properly almost all of the time. More on this later. If I launch one copy of the IDE, then I can usually compile...
10
2117
by: Saso Zagoranski | last post by:
hi, this is not actually a C# problem but since this is the only newsgroup I follow I decided to post my question here (please tell me where to post this next time if you think this post shouldn't be here). I have two design questions: 1. what is the correct (or best) way to include database queries into the code if you plan on
2
286
by: SSRoy | last post by:
Hi all, The type library is an important file for COM interop, without which unmanaged code can't interact with managed code. When I use .NET 2003, I can sucessfully generate .tlb file from a .NET Dll (built with /clr:oldsyntax switch) - using tlbexp or Regasm /tlb. The above technique never works for .NET 2005. (Both for Beta1 & Beta2). The...
5
4070
by: Segfahlt | last post by:
I need a little help here please. I have 2 win forms user controls in 2 different projects that I'm hosting in 2 different virtual directories. The controls have been test and operate okay in both projects. Both controls(dlls) have been signed using SN.exe and I've set up the appropriate .Net assembly permissions using those Strong Names...
11
8340
by: Ron | last post by:
I have a web project compiled with the new "Web Deployment Projects" plugin for VS2005. I'm deploying the web project to one assembly and with updateable option set to ON. When I'm running the generated code on a W2K3 server the application_start and any other event on the global.asax file won't fire. I added tracing and logging to make sure...
2
3369
by: Jeff | last post by:
Hey asp.net 2.0 My asp.net 2.0 project has got a assembly load problem: Some of my web.config settings: <membership defaultProvider="AH_MembershipProvider" userIsOnlineTimeWindow="15">
19
1581
by: Larry Smith | last post by:
Hi there, When I run the following on my app's primary thread: System.Type.GetType("System.Windows.Forms.Form") It works as expected. If I then launch a thread via the "BackgroundWorker" class immediately after the above call, and invoke the above again as soon as the thread starts, it now returns null instead. Can anyone explain this....
0
1073
by: James | last post by:
Occasionally, our websites that we host locally will all start generating errors. There don't seem to be any memory issues. There's nothing in the Event Log that's out of the ordinary. But all at once, our sites will start generating errors like the one below. Restarting IIS doesn't solve anything, but a full reboot does "solve" the...
0
7741
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...
0
8167
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8028
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...
1
5550
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5252
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...
0
3692
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...
0
3688
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2164
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
1
1263
muto222
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.