How do you directly call a native function exported from a
DLL?
Answer Posted / santhanakumar
HERE IS THE CODE EXAMPLE :
using System.Runtime.InteropServices; \
class C
{
[DllImport("user32.dll")]
public static extern int MessageBoxA(int h, string
m, string c, int type);
public static int Main()
{
return MessageBoxA(0, “Hello
World!”, “Caption”, 0);
}
}
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is a formatter in .net remoting?
What are static assemblies and dynamic assemblies. Differences between them?
What is the difference between the RegisterWellknownServiceType(), RegisterWellknownClientType(), RegisterActivatedServiceType() and RegisterActivatedClientType() in .net?
Are you aware of containment and Aggregation ?
What is the difference beween the registerwellknownservicetype() and registerwellknownclienttype()?
How to decide which to use .net remoting or asp.net web services?
What are the ways to configure remoting objects before client can use them?
Hello, I want to connect a system in LAN and i want to access that.When ever i am moving a mouse in my desktop the similar thing have to happend in the another system in which i have connected. I need coding for this in c# and .NET . any one please help me.It is very urgent to me Advance thanks. my email id:manojkumarchallagundla@gmail.com
What are the steps to publish an object outside the service domain
Define a process?
Explain how does assembly versioning in .net prevent dll hell?
Explain how to perform remoting?
Define singleton activation mode in .net remoting?
Elaborate the term WebService and how it differ from Remoting?
What are different types of assemblies?