473,404 Members | 2,170 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,404 software developers and data experts.

Is .NET framework installed with COM wrappers

Hi
In the framework directory I found a lot of tlb files. Does that mean that
the framework can be used by COM by default?

I want to do the following from COM/vba with .NET wrappers. Is that possible?:

Public Shared Function Load(ByVal FilePath As String, ByVal MyType As
String, ByVal MyMethod As String, ByVal MyArguments() As Object) As Object
Dim loadAssembly As System.Reflection.Assembly
Dim loadType As Type
Dim executeMethod As System.Reflection.MethodInfo
Dim loadObject As Object

loadAssembly = System.Reflection.Assembly.LoadFile(FilePath)
loadType = loadAssembly.GetType(MyType)
executeMethod = loadType.GetMethod(MyMethod)
loadObject = Activator.CreateInstance(loadType)
Return executeMethod.Invoke(loadObject, MyArguments)

End Function

Is their any utility which I can use to discover which dll a specified
function belongs to? In this case I want to know where Reflection is?

The ultimate goal is to call a .NET dll from whithin Excel 2000 whithout any
client installations. The only demand is that the framework is instaled and
you know where the .NET dll is.

Regards
/Niklas
Nov 21 '05 #1
3 1175
Niklas,

For what you want to do, you would need to create a wrapper for
mscorlib.dll, for which there is no corresponding .tlb that is installed
with the framework. You would have to install and register it yourself.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Niklas" <Ni****@discussions.microsoft.com> wrote in message
news:C5**********************************@microsof t.com...
Hi
In the framework directory I found a lot of tlb files. Does that mean that
the framework can be used by COM by default?

I want to do the following from COM/vba with .NET wrappers. Is that
possible?:

Public Shared Function Load(ByVal FilePath As String, ByVal MyType As
String, ByVal MyMethod As String, ByVal MyArguments() As Object) As Object
Dim loadAssembly As System.Reflection.Assembly
Dim loadType As Type
Dim executeMethod As System.Reflection.MethodInfo
Dim loadObject As Object

loadAssembly = System.Reflection.Assembly.LoadFile(FilePath)
loadType = loadAssembly.GetType(MyType)
executeMethod = loadType.GetMethod(MyMethod)
loadObject = Activator.CreateInstance(loadType)
Return executeMethod.Invoke(loadObject, MyArguments)

End Function

Is their any utility which I can use to discover which dll a specified
function belongs to? In this case I want to know where Reflection is?

The ultimate goal is to call a .NET dll from whithin Excel 2000 whithout
any
client installations. The only demand is that the framework is instaled
and
you know where the .NET dll is.

Regards
/Niklas

Nov 21 '05 #2
Niklas,

My mistake, there is a wrapper for it. It looks like you should be able
to just set a reference and use it.

As for discovering which dll as specified function belongs to, the
methods are attached to objects, which have types. Those types are always
housed in modules in assemblies. The heiarchy tree is pretty simple, you
can walk up it from any Type instance.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Niklas" <Ni****@discussions.microsoft.com> wrote in message
news:C5**********************************@microsof t.com...
Hi
In the framework directory I found a lot of tlb files. Does that mean that
the framework can be used by COM by default?

I want to do the following from COM/vba with .NET wrappers. Is that
possible?:

Public Shared Function Load(ByVal FilePath As String, ByVal MyType As
String, ByVal MyMethod As String, ByVal MyArguments() As Object) As Object
Dim loadAssembly As System.Reflection.Assembly
Dim loadType As Type
Dim executeMethod As System.Reflection.MethodInfo
Dim loadObject As Object

loadAssembly = System.Reflection.Assembly.LoadFile(FilePath)
loadType = loadAssembly.GetType(MyType)
executeMethod = loadType.GetMethod(MyMethod)
loadObject = Activator.CreateInstance(loadType)
Return executeMethod.Invoke(loadObject, MyArguments)

End Function

Is their any utility which I can use to discover which dll a specified
function belongs to? In this case I want to know where Reflection is?

The ultimate goal is to call a .NET dll from whithin Excel 2000 whithout
any
client installations. The only demand is that the framework is instaled
and
you know where the .NET dll is.

Regards
/Niklas

Nov 21 '05 #3
Niklas,

You can create and associate a DLL with an Excel document using Visual
Studio Tools for Office Development.

See: http://msdn.microsoft.com/vstudio/office/default.aspx

--
Mike

Mike McIntyre
Visual Basic MVP
www.getdotnetcode.com
"Niklas" <Ni****@discussions.microsoft.com> wrote in message
news:C5**********************************@microsof t.com...
Hi
In the framework directory I found a lot of tlb files. Does that mean that
the framework can be used by COM by default?

I want to do the following from COM/vba with .NET wrappers. Is that
possible?:

Public Shared Function Load(ByVal FilePath As String, ByVal MyType As
String, ByVal MyMethod As String, ByVal MyArguments() As Object) As Object
Dim loadAssembly As System.Reflection.Assembly
Dim loadType As Type
Dim executeMethod As System.Reflection.MethodInfo
Dim loadObject As Object

loadAssembly = System.Reflection.Assembly.LoadFile(FilePath)
loadType = loadAssembly.GetType(MyType)
executeMethod = loadType.GetMethod(MyMethod)
loadObject = Activator.CreateInstance(loadType)
Return executeMethod.Invoke(loadObject, MyArguments)

End Function

Is their any utility which I can use to discover which dll a specified
function belongs to? In this case I want to know where Reflection is?

The ultimate goal is to call a .NET dll from whithin Excel 2000 whithout
any
client installations. The only demand is that the framework is instaled
and
you know where the .NET dll is.

Regards
/Niklas

Nov 21 '05 #4

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

Similar topics

6
by: Peter Albertsson | last post by:
Hi, I'm looking for volunteers that wish to help out with an open source project. It is a MVC Web Application Framework that aims to be fit for building larger web sites. It natively supports...
5
by: Mark_S | last post by:
Does the .net framework v1.1 come pre-installed on new Window's PC's? For example, there is a recent news article about AOL selling a $299 PC bundle that has Windows XP Home edition- will this PC...
2
by: j.b.messina | last post by:
This has not yet been published by Microsoft. It will be published within the next few weeks, mainly because I asked them to. I felt this was information badly needed, and I think this is the...
11
by: Geoff Cox | last post by:
Hello, The .NET Framework is about 20MB which is large compared to some apps. Can I assume that the Framework is on modern PCs? Does modern mean PCs sold in the last 6 months, 12 months, etc?? ...
3
by: Niklas | last post by:
Hi In the framework directory I found a lot of tlb files. Does that mean that the framework can be used by COM by default? I want to do the following from COM/vba with .NET wrappers. Is that...
2
by: Someone Please Help! | last post by:
I had Visual Studio .NET installed on my system for a while and then decided I would install a second copy of Windows 2000 on my second drive and use it strictly for developing Visual Basic apps....
3
by: Hugo Mind | last post by:
Hi, Is there a way through the web to find out if a client has the framework 1.1 installed ? I want people to download an installer for our software which includes the framework 1.1 if they...
1
by: Harry Simpson | last post by:
I know I drilled down into the Windows folder\Microsoft.net\Framework\v1.1.4322 folder and looked at the version of Mscorcfg.dll to get the SP level from the version number: Mine shows...
3
by: Hughsie | last post by:
Hi I have created an installation package for my app and I have installed the application onto another machine together with the framework and the correct MDAC version. The problem is when I...
28
by: Peter Olcott | last post by:
I want to double check my understanding about how the .NET framework works. From what I understand every call to the .NET framework is ultimately translated into one of more API calls, is this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...

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.