accessing methods of a dll [closed] - c#

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
how to access the methods of a dll in .net using c#

Include the dll in your references folder in your project.
Here is a good article on doing that: http://msdn.microsoft.com/en-us/library/wkze6zky%28VS.80%29.aspx

That depends on what kind of Dll you are talking about. If you are talking about .Net Dll's, that is, .Net assemblies without an entry point, then Abe's answer applies. If you are talking about unmanaged/native DLL's written in C, you should use the Dllimport attribute in defined in System.Runtime.InteropServices namespcae. This link might help you.

.net
load the Assembly using 'Assembly.Load' or adding a reference
use the Classes in the Assembly
unmanaged
Use DllImport

Related

How to install WH_MSGFILTER? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I am trying to catch all messages that receive another program. As I understand I need to use WinApi hooks, specifically WH_MSGFILTER, but I dont know how to install it properly. Can someone show me complete C# program using different WinApi hooks?
Hooks like that require a DLL that can be injected into another process. You cannot write such a DLL in C#, you cannot get the CLR injected. Only the low-level hooks can work, they don't require injection.
Check this project for an alternative. No idea how solid it is btw.
A process hook to another program requires a native dll (except for keyboard and mouse hooks). Can't be done in C#.

Using a DLL library in C# [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I have a DLL library given to me as homework. I was being told the DLL has the capability of raising events. And I will need to be able to handle those events. I am coding in C#.
Can any one please point me to any tutorials online that will serve the purpose.
Atm, all the google results I get is - how to make a DLL or how to use C++ dll in C#; they are not helping me to serve the purpose.
Can anyone help?
Yes, I know how to add a reference and can connect this to my project.
Since you know how to add a reference, all you need is to add the reference to your class with "using [Class Namespace]" and add an event to your event handler.
This link may help you with this part: http://msdn.microsoft.com/en-us/library/ms743596(v=vs.100).aspx
Add a reference to the project by right-click on the reference-folder in your project. Navigate to the dll and add it. Now you can use it like a project which is in your solution.

How to implement something like "Fences" [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am fascinated by the program "Fences"
How can I implement something which resides on the desktop like it does?
you can move around the fences and they are persistent.
image i.i.com.com/cnwk.1d/i/tim//2009/10/05/Foreman_11108546_4825_fences_210x158.jpg http://i.i.com.com/cnwk.1d/i/tim//2009/10/05/Foreman_11108546_4825_fences_210x158.jpg
My guess is that it has been implemented using a dot net language. Can this be done in C# ?
It's possible that Fences is written in a .NET langage, but it's more likely to be written in C++. A program like this requires very tight integration with the Win32 API - which can be done from .NET, but is easier with C/C++.
Shell extensions required to be coded using a language tied to the Win32 API.
The 'appearance customization window' might be coded using .Net, but the core program is probably C++.

Custom reference types [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
It's always been possible to add references for your project in Visual Studio. These show up under the special "References" folder in the solution explorer. You can also add service references, which also get put under their own special folder. I'd like to create my own reference type, complete with special folder, that other projects can use. What is this called, and where is some good documentation on how to do this?
You mean you want to create a library of classes / a .dll?
http://snippets.dzone.com/posts/show/3861

How to convert C# code to C++ [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
I have a Data Structure class written in C#. How to convert that to C++ (managed)?
Don't convert it. One of the very nice features of .NET is that the types from one managed language can be used in another. Right-click your C++/CLI project, Properties, Common Properties, Framework and References. Click Add New Reference. Use the Projects tab if your C# project is in the same solution (recommended). Otherwise click the Browse tab and navigate to your C# assembly.
You can see how this is done in the Classes and Structs (Managed) page on MSDN. Just put the equivalent types and logic into your C++ ref class, and you'll make a managed class in C++.

Categories