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
Difference between .net remoting versus distributed com?
Explain the difference between the registerwellknownservicetype(), registerwellknownclienttype(), registeractivatedservicetype() and registeractivatedclienttype() in .net?
Explain marshalling and its types in .net remoting
Explain serialization formatters in .net remoting
How do you implement distributed applications in .net?
What is the proxy of the server object in .net remoting?
What are different types of assemblies?
What are static assemblies?
Which one is better WebService and Remoting ?
What are the different types of channels used by .net remoting?
Define proxy in .net remoting?
What is the Difference between CAO and SAO in Remoting.
What is Remoting?
What are the channels in .net remoting?
Define the lease of the object?