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,
here place the function in "dllname" Dll.
The runtime checks to see that only one version of an
assembly is on the machine at any one time.
.NET allows assemblies to specify the name AND the version
of any assemblies they need to run.
The compiler offers compile time checking for backward
Binary over TCP is the most effiecient, SOAP over HTTP is
the most interoperable.
.NET remoting is specifically used when you are using only
Microsoft platform. Remoting cannot be used between .net
client and non .NET clients.
Web services though can be used for communication on
MIcrosoft technologies, but their main feature is Platform
So if you are using client and server supporting .NET
framwork, iwould recommend to use .NET remoting because
you can customise it to great detail and also its faster.
If you are developing for cross platform technologies, you
cannot use .NET remoting. So the only option you have is ot
use web services
Remoting Performance and Auto Web Proxy .
The .Net Framework 2.0 has significant changes to its
support for proxies including support for connection-
specific proxy settings, automatic proxy configuration and
the ability to automatically refreshing proxy settings
whenever the active connection changes. These features can
be very useful in .Net Remoting but the auto web proxy
feature can also affect performance. If you do not need
these settings in your client it might be useful to disable
There are a number of ways to disable this:
1. In Internet Explorer Open Internet Options,
(either through control panel or the Internet Explorer™
tools menu), switch to the connections tab, and select LAN
settings. Clear all checkboxes under automatic
configuration. This will disable automatic proxy settings
for the current user (note that this will not work for
ASP.NET sites making outgoing web service calls because
they run under a different user).
2. Imperatively disable it by setting
System.Net.WebRequest.DefaultWebProxy = null;
3. In your config file bypass the proxy for your web-
server. You can also disable the default proxy altogether.
.Net remoting is replacement of DCOM.
Step 1:Build a proxcy which is looks like a real obj.
Step 2:By useing proxcy U can make method calls on remoting
Step 3:These method calls know as "Messages", messages can
be serialized by Formater.
Step 4:It send to client channel.
Step 5:Client channel communicate with sever channel. And
Deserialized the Messages.
Step 6:Sever send the exact remot obj.
Marshal-by-value objects are copied by the remoting system
and passed in their entirety to the caller's application
domain. Once copied to the caller's application domain (by
the marshaling process), all method calls and property
accesses are executed entirely within that domain. The
entire object exists in the caller's domain, so there is no
need to marshal accesses across domain boundaries. Using
marshal-by-value objects can increase performance and
reduce network traffic when used for small objects or
objects to which you will be making many accesses. However,
because the object exists entirely in the caller's
application domain, no state changes to the object are
communicated to the originating application domain, or from
the originator back to the caller. Marshal-by-value is not
a good choice for very large objects with many accesses. It
makes little sense to marshal an entire large object across
domain boundaries when all you need is access to a single
field, method, or property.
Remoting is something like web services. You might decide to opt for
Remoting instead of web services in following cases...
1) Client and server platform is fixed
2) Protocol is NOT fixed. (Like web services strictly work
on HTTP protocol)
3) Where object serialization is to be done strictly
4) Where platform is fixed i.e. .Net framework.
There are 2 types of channels .
channel means sending messages. 2 types are http and tcp
Tcp is used for lan , http is used for lan and wan
1. Web service is to achieve cross-platform interoperability where as .NET Remoting desgined expressly for .NET -to- .NET communications.
2. .NET Remoting would offer best performance for communicating .NET applications where as web services wouldn't
in this case.