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 a formatter in .net remoting?

1138


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

1194


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

927


Are you aware of containment and Aggregation ?

3227


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

1084


How to decide which to use .net remoting or asp.net web services?

935


What are the ways to configure remoting objects before client can use them?

1166


Hello, I want to connect a system in LAN and i want to access that.When ever i am moving a mouse in my desktop the similar thing have to happend in the another system in which i have connected. I need coding for this in c# and .NET . any one please help me.It is very urgent to me Advance thanks. my email id:manojkumarchallagundla@gmail.com

2754


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

990


Define a process?

1089


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

1132


Explain how to perform remoting?

1011


Define singleton activation mode in .net remoting?

1063


Elaborate the term WebService and how it differ from Remoting?

998


What are different types of assemblies?

1189