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

Explain the differences between marshal by value and marshal by reference?

987


What are the remotable objects in .net remoting?

914


Can you pass SOAP messages through remoting?

982


About Iunknown interface Queue ,its methods Query Interface Addref,Release and Explain each ?

2933


what is Client-activated object in remoting?

950


What is the purpose of strong name?

981


Can you explain remoting?

971


what are the requirements to enable remote components to interact each other?

898


Name the distributed systems available apart from .net remoting?

897


What are the different types of channels used by .net remoting?

883


What is the difference between the RegisterWellknownServiceType(), RegisterWellknownClientType(), RegisterActivatedServiceType() and RegisterActivatedClientType() in .net?

864


Garbage collector?s functionality on unmanaged code ?

3498


What is unboxing?

917


What are the security features in .net remoting?

946


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

937