How do you directly call a native function exported from a
DLL?
Answers were Sorted based on User's Feedback
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 |
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 |
Elaborate the term WebService and how it differ from Remoting?
Which namespace is used for encryption ?
Choosing between HTTP and TCP for protocols and Binary and SOAP for formatters, what are the trade-offs?
Name the distributed systems available apart from .net remoting?
what is the diff between remoting and webservice
What is the difference between private and shared assembly?
What are the information required to configure remote objects?
What is UUID and GUID what is the size of this ID ?
When we use web service and when we use Remoting?
What are the steps to publish an object outside the service domain
How do you define the lease of the object?
What are various types of assemblies ?