You can use Remote Method Invocation in C#. And for this, PIDL compiler can create proxy and stub code of C#. If you execute as below, proxy and stub code of C# will be created. (Existing –clr is same as -cs)
When developing an application program, there would be a module that is commonly used between server and client. The proxy and stub code of C# should be placed in that common module. And for this module, you should custom build C# project after receiving PIDL file same as How to run PIDL Compiler. In order to do this, please refer to below.
Proxy and stub created by building C2S.pidl are as below.
You should include them as source files at C# project(.csproj). But, please be reminded that these files are the build outcomes only, not user-written sources. So they shouldn't be included in your source control (i.e. SVN). Otherwise, it could prompt a writing error at a read-only file.
It is recommended to open .csproj in an editor and modify like this below.
The class names of Proxy and stub created by C# are same with those of C++. And the usage is also identical. (Refer to Attaching RMI proxy and stub)
For more details, please refer to the common module source from Sample codes of using ProudNet in C#.