Rpc from Windows to Linux

RPC from Windows to linux

I think you have 2 possible ways to deal with this:

1- You can try using DCOM with wine, which means that you will actually write your code for windows, but at the same time you can test your results in the process and avoid using WinAPI calls that wine is not able to handle properly. This approach will allow you to generate stubs code from your IDL files.

2- You can try using Samba RPC Pluggable Modules, but I am afraid in this case the RPC communication will be more primitive.

Edit:

It seems there are many other ways. I found a list of libraries in DCOM-Wikipedia, j-Interop for example looks particularly promising.

How to implement RPC client on Windows

Windows has its own version of RPC. It works fine between Windows boxes only.

For interoperability you need to look at CORBA or WCF.

How to cross-platform remote procedure call in C++ (Linux/Win)

There is no magic to RPC. I would suggest having a look at a combination of ZeroMQ and Google protobuf. ZeroMQ is a very easy to use messaging system (your communication layer). You would use the REQ/REP pattern. Google protobuf is used to describe and serialize/deserialize your messages. Both libraries are cross-platform and even cross language (ruby, python, c++, etc. etc.)

Passing the list of available windows services into an array and prompt user to select the service for activation

This is much simpler using the select command. We'll pretend that net rpc service list outputs a list of words that won't be unduly affected by word-splitting or pathname expansion.

# Just to cut down on some repetition
run_net_rpc () {
net rpc "$@" -I "$host" -U "$domain/$user%$pw"
}

readarray -t services < <(run_net_rpc service list | grep -i Rpc)
select svc in "${services[@]}"; do
run_net_rpc activate service "$svc"
break
done


Related Topics



Leave a reply



Submit