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 CAO and SAO in Remoting.
When should we choose .net remoting over .net web services?
What do you mean by passport authentication?
Explain how does assembly versioning in .net prevent dll hell?
Explain how to perform remoting?
Define singleton activation mode in .net remoting?
Explain the types of .net remoting?
Which Namespaces is used to achieve the Remoting?
What are the security features in .net remoting?
Explain the difference between the registerwellknownservicetype(), registerwellknownclienttype(), registeractivatedservicetype() and registeractivatedclienttype() in .net?
What is the purpose of strong name?
Difference between web services & remoting?
What is the difference beween the registerwellknownservicetype() and registerwellknownclienttype()?
Will clr handle unmanaged code or not?
What are the types of remoting?