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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Name the distributed systems available apart from .net remoting?

558


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

502


Garbage collector?s functionality on unmanaged code ?

3099


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

2570


Explain serialization formatters in .net remoting

564






Are you aware of containment and Aggregation ?

2690


How are the activation URLs different in case of SAO and CAO in .NET remoting?

2087


Will clr handle unmanaged code or not?

571


What are the remotable objects in .net remoting?

530


Explain how can you automatically generate interface for the remotable object in .net with microsoft tools?

555


Define singlecall activation mode in .net remoting?

519


What is unmanaged code?

526


Define a process?

545


What are the security features in .net remoting?

541


Define delegates and events?

574