idl

Java IDL for gRPC / protobuf (Protocl Buffers)

我是研究僧i 提交于 2019-12-06 17:09:22
问题 Is it possible to define Protocol Buffers using Java? That is instead of service Greeter { rpc SayHello (HelloRequest) returns (HelloReply) {} } I would like to have public interface Greeter { @Grpc HelloReply sayHello (HelloRequest req); } @GrpcMessage() public class HelloReply{ @GrpcField(1) string name; } That is annotation like Hibernate/JPA over my POJO, instead of heaps of generated code. I only could find Protocol Buffers Dynamic Schema https://github.com/os72/protobuf-dynamic 回答1:

Problem creating COM-library only containing enum's

人盡茶涼 提交于 2019-12-05 20:33:19
I'm am doing a COM-interop project. Substituting some VB and C++ ATL COM projects with C# and .NET Interop. When i define enumerations in .NET and they are made ComVisible, they get exposed as Typelib.EnumType_EnumValue enstead of just Typelib.EnumValue. The typelib exporter does this to ensure that the value names are unique. But i know that all my enum's are unique, so i don't want the underscores. Also there is a lot of client code that needs alteration if i don't get rid of the underscores. To find a solution to this problem, i have defined the enum's in an IDL-file and creating a typelib

COM - #include generated header vs #import generated tlb

…衆ロ難τιáo~ 提交于 2019-12-05 14:39:59
I have many projects of which generate COM DLL's, these projects output the following: projectname_i.h projectname_i.c projectname_p.c projectname_i.tlb Then where another project consumes this DLL it is used like so: #import "projectname.tlb" named_guids no_namespace I want to change this to use include instead of import. The reason behind wanting to change from #import to #include is because I want to enable the /MP compiler switch to speed up build times. http://msdn.microsoft.com/en-us/library/bb385193.aspx So what I would like to know is: Why do COM DLLs have a TLB and a H? Which should

C# - writing a COM server - Properties mapped to methods

随声附和 提交于 2019-12-05 05:56:09
问题 We are trying to replace a COM server originally written for a VB6 application We have no access to source code. For some reason, the VB6 app can call our constructor, but then it gets: System Error &H80004002. No such interface supported. I assume when it tries to get the interface with QueryInterface. We have our assembly properly sent through regasm /tlb and gacutil, but I then noticed something strange. I opened the .tlb file regasm generated for our assembly, and noticed all the

Java IDL for gRPC / protobuf (Protocl Buffers)

我们两清 提交于 2019-12-04 22:17:42
Is it possible to define Protocol Buffers using Java? That is instead of service Greeter { rpc SayHello (HelloRequest) returns (HelloReply) {} } I would like to have public interface Greeter { @Grpc HelloReply sayHello (HelloRequest req); } @GrpcMessage() public class HelloReply{ @GrpcField(1) string name; } That is annotation like Hibernate/JPA over my POJO, instead of heaps of generated code. I only could find Protocol Buffers Dynamic Schema https://github.com/os72/protobuf-dynamic Have a look at protostuff: https://github.com/protostuff/protostuff It supports what you want for protobuf

How to get IDL from a .NET assembly (or how to to convert TLB to IDL) in a command line?

两盒软妹~` 提交于 2019-12-04 21:25:02
问题 We have a .NET assembly (Aspose.Words actually) and we want clients to use it from COM clients without much hassle. So we ship a .TLB with the assembly so the client can use it from languages such as C++ or Delphi and don't bother extracting .TLB themselves. We also ship an .IDL with the assembly so the clients can look into it if they want to see the enumeration values if they are programming in ASP for example. I want .TLB and .IDL to be generated by a build script. I can generate .TLB no

What do you do when MIDL can't create a tlb?

痞子三分冷 提交于 2019-12-04 08:15:40
I am attempting to create a C# inproc server for sbtsv.idl (it is included with the Windows 8 SDK). Almost every instructions I find tell you to use MIDL to create a .tlb file then tlbimport to create the proxy dll. However, if the IDL does not include a library section no .tlb file will be generated , and sbtsv.idl does not include a library section. I tried creating my own IDL file that declared the interface I wanted to create inside a library #include "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include\sbtsv.idl" [uuid(43250D0C-BBC6-4109-BCD2-6F61F0D3B611)] library sbtsvClientLib

C# - writing a COM server - Properties mapped to methods

試著忘記壹切 提交于 2019-12-03 17:34:06
We are trying to replace a COM server originally written for a VB6 application We have no access to source code. For some reason, the VB6 app can call our constructor, but then it gets: System Error &H80004002. No such interface supported. I assume when it tries to get the interface with QueryInterface. We have our assembly properly sent through regasm /tlb and gacutil, but I then noticed something strange. I opened the .tlb file regasm generated for our assembly, and noticed all the properties on my interface show up as methods. Is this something the .Net tools are doing? And would this cause

IDL for JSON REST/RPC interface

妖精的绣舞 提交于 2019-12-03 16:27:12
问题 We are designing a fairly complex REST API, in which most of the I/O are JSON encoded objects with a specific structure. One challenge we have found is to document the API in such a way that makes it easier for clients to post correct input and process output. Because the data of both the input and output requires fairly complex JSON objects, client developers often introduce bugs related to the structure of the I/O objects. With all of the JSON web API's these days, I would have hoped for a

Conversion between C structs (C++ POD) and google protobufs?

☆樱花仙子☆ 提交于 2019-12-03 14:07:01
I have code that currently passes around a lot of (sometimes nested) C (or C++ Plain Old Data) structs and arrays. I would like to convert these to/from google protobufs. I could manually write code that converts between these two formats, but it would be less error prone to auto-generate such code. What is the best way to do this? (This would be easy in a language with enough introspection to iterate over the names of member variables, but this is C++ code we're talking about) One thing I'm considering is writing python code that parses the C structs and then spits out a .proto file, along