473,396 Members | 1,970 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

using Dlls present in remote machine

I need to import dlls that are present in the remote machine. Its a dll
written in C that exposes methods. I want to import that dll in my C#
application. But that dll is not present in the local machine. Its not a
webservice. I need something like remote method invocation(but dlls).
Nov 17 '05 #1
4 4645
Rohith,

Do you need the dll to run on the remote machine or do you need it to
run on the local machine?

If you need it to run on the local machine, then you should just
distribute it with your application and call it through the P/Invoke layer.

If you need it to run on the remote machine, then you have a few
options. The first would be to create a component derived from
ServicedComponent that will act as a server in COM+, and then make the
remote call from the client machine. The COM+ component would then make the
call to the dll on the remote machine.

You can also use remoting to do this as well, or expose a web service
from the remote machine. In the end, you will have to wrap the call somehow
in a technology that will allow the remote call.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Rohith" <Ro****@discussions.microsoft.com> wrote in message
news:9C**********************************@microsof t.com...
I need to import dlls that are present in the remote machine. Its a dll
written in C that exposes methods. I want to import that dll in my C#
application. But that dll is not present in the local machine. Its not a
webservice. I need something like remote method invocation(but dlls).

Nov 17 '05 #2
Nicholas,

I need to run that dll in the remote machine and in my local C# application
i need to use those methods in dll.. If you have samples or articles where i
could get more information regarding this kindly let me know.
Thanks
"Nicholas Paldino [.NET/C# MVP]" wrote:
Rohith,

Do you need the dll to run on the remote machine or do you need it to
run on the local machine?

If you need it to run on the local machine, then you should just
distribute it with your application and call it through the P/Invoke layer.

If you need it to run on the remote machine, then you have a few
options. The first would be to create a component derived from
ServicedComponent that will act as a server in COM+, and then make the
remote call from the client machine. The COM+ component would then make the
call to the dll on the remote machine.

You can also use remoting to do this as well, or expose a web service
from the remote machine. In the end, you will have to wrap the call somehow
in a technology that will allow the remote call.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Rohith" <Ro****@discussions.microsoft.com> wrote in message
news:9C**********************************@microsof t.com...
I need to import dlls that are present in the remote machine. Its a dll
written in C that exposes methods. I want to import that dll in my C#
application. But that dll is not present in the local machine. Its not a
webservice. I need something like remote method invocation(but dlls).


Nov 17 '05 #3
Rohith,

When you say you need to run them local in your C# application, I assume
you mean that you need to initialize the call from your C# application, but
have it execute on the remote machine.

In this case, look up "Remoting" in the .NET documentation. There
should be a tutorial there on how to create a remoting server and client
proxy.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Rohith" <Ro****@discussions.microsoft.com> wrote in message
news:A8**********************************@microsof t.com...
Nicholas,

I need to run that dll in the remote machine and in my local C#
application
i need to use those methods in dll.. If you have samples or articles where
i
could get more information regarding this kindly let me know.
Thanks
"Nicholas Paldino [.NET/C# MVP]" wrote:
Rohith,

Do you need the dll to run on the remote machine or do you need it to
run on the local machine?

If you need it to run on the local machine, then you should just
distribute it with your application and call it through the P/Invoke
layer.

If you need it to run on the remote machine, then you have a few
options. The first would be to create a component derived from
ServicedComponent that will act as a server in COM+, and then make the
remote call from the client machine. The COM+ component would then make
the
call to the dll on the remote machine.

You can also use remoting to do this as well, or expose a web service
from the remote machine. In the end, you will have to wrap the call
somehow
in a technology that will allow the remote call.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Rohith" <Ro****@discussions.microsoft.com> wrote in message
news:9C**********************************@microsof t.com...
>I need to import dlls that are present in the remote machine. Its a dll
> written in C that exposes methods. I want to import that dll in my C#
> application. But that dll is not present in the local machine. Its not
> a
> webservice. I need something like remote method invocation(but dlls).


Nov 17 '05 #4

"Rohith" <Ro****@discussions.microsoft.com> wrote in message
news:9C**********************************@microsof t.com...
I need to import dlls that are present in the remote machine. Its a dll
written in C that exposes methods. I want to import that dll in my C#
application. But that dll is not present in the local machine. Its not a
webservice. I need something like remote method invocation(but dlls).


If the DLL is a native C++ code DLL, there is no way to do call any method
directly from C#.
But, you say it's a C dll that exposes 'methods', well a C dll doesn't
expose methods, it can at best export functions. Now these functions can be
called through PInvoke but only when the DLL is local. If you really need
this to be remoted, you will have to create a C# wrapper for your DLL and
use .NET remoting to call it from a C# remoting client. Another option is
wrap the DLL in a C# DLL using System.EnterpriseServices and drop this DLL
in a servertype COM+ application, export a proxy from this server
application and use this proxy at the client to call the server from a C#
client.

Willy.


Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: sandiyan | last post by:
Hi, I am trying to use java to do the following: Remote machine(Windows): Has a drive mapped(m:\) to a network share. Invoking a BAT file(test.BAT) from this drive will install an application...
0
by: jinu | last post by:
hello I am developing a vb.net application in my machine and need to test the program in a remote machine. I now use to upload the BIN directory fully to the remote machine and test the exe there....
4
by: Charlie363 | last post by:
Hi to all, I have a little asp.net website which works great on the local machine but I cannot seem to access it from a remote machine. It is not a connection problem because my remote machine...
1
by: Swarna | last post by:
Hi all, I am trying to find out whether a particular directory is present on a remote machine or not from my local Python script in Linux . Can anyone help me with the command that i need to...
3
by: Nidhee Pathak via .NET 247 | last post by:
Hi, I am trying to run an exe present on the remote machine using the ManagementClass object. I connect to the remote machine using ObjectManagementScope class, but i am not being able to run the...
0
by: Reshma | last post by:
Hello, How to send messages to a queue preent on remote machine. I have given all the rights to the user. Still the user is able to create a queue through program but is not able to send...
9
shrek123
by: shrek123 | last post by:
How to write to a ".txt" file present on remote machine. I dont want to use two way socket connection. Is there any other way to write to a file on remote machine? Best Regards, Shrek.
7
pod
by: pod | last post by:
Hello My OS is Windows2000 I am new to .NET I developed a C# Windows Application that connects to a MS Access database on the network using proper UNC format. It works perfectly on my...
7
by: Chris Marsh | last post by:
All I've been asked run a VM on my development machine, with Windows Server 2003 installed. I've also been asked to then develop against this environment from the host machine, using Visual...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.