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 the difference between remoting and webservice?
Explain when we use web service and when we use remoting?
What is fundamental of published or precreated objects in remoting?
How do you implement distributed applications in .net?
Explain how to directly call a native function exported from a dll?
What is unmanaged code?
What are the difference between static assemblies and dynamic assemblies?
How do you directly call a native function exported from a DLL?
How can we call methods in remoting asynchronously?
Define singlecall activation mode in .net remoting?
Explain the types of .net remoting?
Explain how does assembly versioning in .net prevent dll hell?
What is Remoting?
What are the steps to publish an object outside the service domain
What are the advantage of remoting over web services?