Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
586 views
in Technique[技术] by (71.8m points)

winapi - RPC from Windows to linux

Is there some (working) example how to create RPC from windows to linux?

Client should be windows NT application, server is linux.

It needs to be MSRPC.

No Corba, no XML-RPC, SUN-RPC etc

MSDN says this:

RPC can be used in all client/server applications based on Windows operating systems. It can also be used to create client and server programs for heterogeneous network environments that include such operating systems as Unix and Apple.

Unfortunately after spending few hours on google I'm giving up.

My expectation:

  • Linux node should have samba installed, because their MSRPC implementation works.
  • Using IDL file I generate stubs for both client and server
  • Client is built using MSVC
  • Server is build using gcc with some includes/libraries from samba (or other libs)
  • Linux node must have such RPC port mapper

Can someone point me out?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...