Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the difference between remoting and webservice?

977


Explain when we use web service and when we use remoting?

950


What is fundamental of published or precreated objects in remoting?

1013


How do you implement distributed applications in .net?

987


Explain how to directly call a native function exported from a dll?

996


What is unmanaged code?

1145


What are the difference between static assemblies and dynamic assemblies?

1133


How do you directly call a native function exported from a DLL?

7583


How can we call methods in remoting asynchronously?

981


Define singlecall activation mode in .net remoting?

988


Explain the types of .net remoting?

1129


Explain how does assembly versioning in .net prevent dll hell?

1070


What is Remoting?

1082


What are the steps to publish an object outside the service domain

937


What are the advantage of remoting over web services?

914