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 are the ways to renew lifetime leases of objects?
Write a example code for remoting?
Is it a good design practice to distribute the implementation to remoting client?
Elaborate the term WebService and how it differ from Remoting?
Garbage collector?s functionality on unmanaged code ?
What are the different types of channels used by .net remoting and which is the best one?
What are static assemblies and dynamic assemblies. Differences between them?
What are the steps to publish an object outside the service domain
When do we use delegates in your remoting applications?
What are the types of remotable objects?
Can you pass SOAP messages through remoting?
Explain threading types?
What is unmanaged code?
What does manifest consists?
What is the difference beween the registerwellknownservicetype() and registerwellknownclienttype()?