Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using dll to launch remote execution

Status
Not open for further replies.

StarvnMarvn

Programmer
Jan 12, 2004
1
US
I need to replace a dll (currently written in MSVC++) that needs to do the following:

1) Called by various apps: PowerBuilder, Cold Fusion etc.

2) Take in a login, password and name of the file to execute on a remote machine (Taking in login/pwd is the functionality that is missing from the current dll)

3) Return a code indicating success or failure.

The current sourcecode is irretrievable. I believe it made socket calls and some such.

There is a UNIX command "rexec" that works from my command prompt. However, when I use "rexec" in my dll using:

a) ShellExecuteEx(&ShExecInfo)
b) CreateProcess(....)

it does not launch anything remotely. I can launch, say notepad.exe, on the same machine using (a), but it does not work if I specify a remote machine.

Is there a function out there that does (or partially does) this, or would I have to reinvent the wheel to accomplish this? TIA.

 
Try looking up Remote Procedure Calls (RPC) in the C++ documentation. I have never tried this before - usually its easier to comunicate with client-server models, i.e. get the server program to send the command-string and the client upon recieving the message to execute that string.

The RPC method is probably better though...
:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top