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
How to Connect to the Fitbit Zip Over Bluetooth 4.0 Le on Linux with Bluez
Receiving Udp Broadcast Packets on Linux
Pytorch Says That Cuda Is Not Available
What Scheduling Algorithms Does Linux Kernel Use
How to Erase Printed Characters in a Console Application(Linux)
Linux Kernel: How to Capture a Key Press and Replace It with Another Key
Replace a Text with a Variable
Openssl Encoding Errors While Converting Cer to Pem
Renaming a Set of Files to 001, 002,
Linux 3/1 Virtual Address Split
Why Is Crond Failing to Run a Non-Root Crontab on Alpine Linux
Linux Command to Delete All Files Except .Git Folder
Linux: How to Detect That Ftp File Upload Is Finished
Gdb Does Not Hit Any Breakpoints When I Run It from Inside Docker Container
How to Do Runtime Binding Based on CPU Capabilities on Linux