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 are the ways to renew lifetime leases of objects?

1041


Write a example code for remoting?

984


Is it a good design practice to distribute the implementation to remoting client?

888


Elaborate the term WebService and how it differ from Remoting?

925


Garbage collector?s functionality on unmanaged code ?

3534


What are the different types of channels used by .net remoting and which is the best one?

955


What are static assemblies and dynamic assemblies. Differences between them?

1130


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

920


When do we use delegates in your remoting applications?

935


What are the types of remotable objects?

983


Can you pass SOAP messages through remoting?

1027


Explain threading types?

1036


What is unmanaged code?

1105


What does manifest consists?

934


What is the difference beween the registerwellknownservicetype() and registerwellknownclienttype()?

1028