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?

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / moghan

Yes we can call a native function exported from a Dll in
the following way,
I used C#.Net for Coding.

Add a Namespace that "System.Runtime.InteropServices"

Then use the following code,

Syntax:
[DllImport("dllname")]
here place the function in "dllname" Dll.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Dot Net Remoting Interview Questions

Choosing between HTTP and TCP for protocols and Binary and SOAP for formatters, what are the trade-offs?

2 Answers  


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

0 Answers  


What's the difference btw the following methods in .NET remoting? RegisterWellknownServiceType() RegisterWellknownClientType() RegisterActivatedServiceType() RegisterActivatedClientType()

1 Answers  


what is the diff between remoting and webservice

1 Answers  


What are the security features in .net remoting?

0 Answers  


Name the distributed systems available apart from .net remoting?

0 Answers  


What security measures exist for .NET Remoting in System.Runtime.Remoting?

1 Answers  


What is the difference between remoting and webservice?

0 Answers  


What do you mean by passport authentication and windows authentication ?

5 Answers   TCS,


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

2 Answers  


What?s a Windows process?

1 Answers  


What do mean by remotable objects in .net remoting?

0 Answers  


Categories