idl

Getting IDL (for TLB) from a COM+ dll when it is not provided

假装没事ソ 提交于 2019-12-23 11:49:35
问题 I have a .dll that contains some directshow filters (COM) with specific/custom interfaces to query. Most 3rd party directshow components contain embedded .tlb files that can be used for cross-enviroment communication (C# typelib import). I would hate to have to attempt to manually create the interfaces needed for c# because no idl/tlb files were provided. Is it possible to generate a tlb (or at least, an idl, which I can MIDL compile) from a COM .dll? 回答1: Yes, it is possible to reverse

Problem creating COM-library only containing enum's

馋奶兔 提交于 2019-12-22 10:46:00
问题 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

COM - #include generated header vs #import generated tlb

人盡茶涼 提交于 2019-12-22 09:18:04
问题 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

COM - #include generated header vs #import generated tlb

人盡茶涼 提交于 2019-12-22 09:17:54
问题 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

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

独自空忆成欢 提交于 2019-12-21 17:13:57
问题 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

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

徘徊边缘 提交于 2019-12-21 04:31:24
问题 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

cmake: read and compile dynamically-generated list of cpp files

夙愿已清 提交于 2019-12-19 19:22:11
问题 I have a custom tool that processes a given list of IDL files and produces a number of .cpp and .h files as output. I want to add those files to the list of things to compile in my CMakeLists, and also model the dependencies those files have on the IDL. To keep things simple, I will state that any change to any of the IDL files should trigger a regeneration of all cpp/h. I have a custom command that takes care of running the generator tool and listing all the IDL files as dependencies. My

cmake: read and compile dynamically-generated list of cpp files

感情迁移 提交于 2019-12-19 19:19:04
问题 I have a custom tool that processes a given list of IDL files and produces a number of .cpp and .h files as output. I want to add those files to the list of things to compile in my CMakeLists, and also model the dependencies those files have on the IDL. To keep things simple, I will state that any change to any of the IDL files should trigger a regeneration of all cpp/h. I have a custom command that takes care of running the generator tool and listing all the IDL files as dependencies. My

Any sense in marking an IUnknown-derived interface as dual in IDL?

雨燕双飞 提交于 2019-12-18 06:27:09
问题 Reviewing our code I've found a curious definition in one of .idl files: [ object, uuid(uuidhere), dual, nonextensible, oleautomation, hidden ] interface IOurInterface : IUnknown { //methods here }; How can an interface derived directly from IUnknown possibly be a dual interface? Will anything break if I remove the dual attribute? 回答1: In this answer to another question concerning marshaling user voyce points to this article that basically states the following: When any interface (IDispatch

Any sense in marking an IUnknown-derived interface as dual in IDL?

倾然丶 夕夏残阳落幕 提交于 2019-12-18 06:25:46
问题 Reviewing our code I've found a curious definition in one of .idl files: [ object, uuid(uuidhere), dual, nonextensible, oleautomation, hidden ] interface IOurInterface : IUnknown { //methods here }; How can an interface derived directly from IUnknown possibly be a dual interface? Will anything break if I remove the dual attribute? 回答1: In this answer to another question concerning marshaling user voyce points to this article that basically states the following: When any interface (IDispatch