473,397 Members | 1,960 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,397 software developers and data experts.

How to retrieve DLL function detail

Hi !

I have a dll written in manage code. (csharp).
I would like to how can we programmatcially retrieve the interface for
each function written in the dll.

Something like function name, return value, each paramenter name and
variable type,
it will look something like the 'class view' , just that the parameter
name will be listed there as well.

We have the source doe of the dll, just that it is too tedious to copy
and past the function name 1 by 1.
Any idea how can i achieve that ?

Thanks in advanced.

Jan 26 '07 #1
2 3026
pizza wrote:
I have a dll written in manage code. (csharp).
I would like to how can we programmatcially retrieve the interface for
each function written in the dll.

Something like function name, return value, each paramenter name and
variable type,
it will look something like the 'class view' , just that the parameter
name will be listed there as well.

We have the source doe of the dll, just that it is too tedious to copy
and past the function name 1 by 1.
Any idea how can i achieve that ?
Two code snippets that should give you the general idea.

Assembly asm = Assembly.LoadFile(fnm);
Type[] types = asm.GetExportedTypes();
foreach(Type t in types)

MethodInfo[] mets = t.GetMethods(BindingFlags.Public |
BindingFlags.Instance | BindingFlags.Static);
foreach(MethodInfo m in mets)
Arne
Jan 26 '07 #2


On Jan 26, 11:29 am, Arne Vajhøj <a...@vajhoej.dkwrote:
pizza wrote:
I have a dll written in manage code. (csharp).
I would like to how can we programmatcially retrieve the interface for
each function written in the dll.
Something like function name, return value, each paramenter name and
variable type,
it will look something like the 'class view' , just that the parameter
name will be listed there as well.
We have the source doe of the dll, just that it is too tedious to copy
and past the function name 1 by 1.
Any idea how can i achieve that ?Two code snippets that should give youthe general idea.

Assembly asm = Assembly.LoadFile(fnm);
Type[] types = asm.GetExportedTypes();
foreach(Type t in types)

MethodInfo[] mets = t.GetMethods(BindingFlags.Public |
BindingFlags.Instance | BindingFlags.Static);
foreach(MethodInfo m in mets)

Arne
Hi Arne !!!

Thanks for your great help !
Do you know how can i get rid of 'Property' and common method like
'GetHashCode', 'Equals', 'ToString' and 'GetType' ?

Jan 29 '07 #3

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

Similar topics

2
by: forums_mp | last post by:
I've got an STL class (see below) with two functions to store and retrieve data - msg structs. The "Store" function when called will copy the received message (depending on which message) into...
1
by: Eugfene | last post by:
I have the following function in a html file: function selectEdit(fileID, processCode, processID, fileName,fileDesc) { document.forms.recordID.value = fileID; document.forms.processor.value =...
8
by: Dutchy | last post by:
Dear reader, In an attempt to obtain the path to the quick-launch-folder in order to create a shortcut to my application-updates during installation , I thought to: 1- check if quick launch...
7
by: Felix Kater | last post by:
Hi, when I need to execute a general clean-up procedure (inside of a function) just before the function returns -- how do I do that when there are several returns spread over the whole function?...
4
by: Maya | last post by:
Hello Everybody, I have an application that receives a text in this format: Received from john by server.com with ESMTP (SMTPD32-8.05) id AD5258A0142; Sun, 01 Aug 2004 02:54:26 +0100 From:...
12
by: jaYPee | last post by:
I have currently using a dataset to access my data from sql server 2000. The dataset contains 3 tables that is related to each other. parent/child/grandchild relationship. My problem is it's very...
0
by: ravescar | last post by:
I am currently working on an generic error collection mechanism in ASP.NET2.0 written using C# that can catch unhandled exception on a web application in application level. it automatically save an...
2
by: | last post by:
I want to know how to make a clickable button or Command field on a GridView, and have the user's action a) fire a function and b) pass a data value from one of the GridView's columns to that...
1
by: Noah Roberts | last post by:
Trying to use boost::function in a C++/CLI program. Here is code: pragma once #include <boost/function.hpp> #include <boost/shared_ptr.hpp> #include <vector> using namespace System;
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
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
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
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
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,...
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.