MIDL 复杂类型作为接口方法参数
我想知道是否有一些好的解决方案来处理无法导入 IDL 的复杂类型。我最关心的是使用 _m128 向量类型来模拟指令,即。 XMVECTOR。 midl 编译器无法识别 __declspec,因此不可能导入 __m128 数据类型。我研究过使用wire_marshal来执行此操作,但我认为它需要了解__m128类型的typedef。如果有一种方法可以让我foreword_declare XMVECTOR 与wire_marshal 一起使用,我对如何做到这一点一无所知。
我曾想过通过封装类型来隐藏类型,而我正在封装反射的数据类型。我在这里尝试了一些想法,包括从 COM 和 C++ 接口继承。这里看起来没有什么太有希望的。
很多人告诉我不要使用 COM,老实说,我花了很多时间没有编码,只是想弄清楚这些东西。我的逻辑一直认为使用 COM 有很多好处,而包括 MyCOM 在内的替代方案看起来同样耗时且充满问题。如果这是我使用 COM 时遇到的最大问题,我是否应该继续前言,或者解决方案是否会减慢该应用程序的速度,同时记住它对图形表示和实时计算建模的依赖?我正在考虑在渲染农场或云或类似的东西上做一些事情...我说得很大,我知道我是菜鸟,所以拜托,不要试图给人留下深刻的印象,只是想了解情况...我已经做了很多研究!
谢谢, 贝卡德:
I would like to know if maybe there are some good solutions to handling complex types not importable into IDL. My biggest concern is using _m128 vector types for simmed instructions ie. XMVECTOR. __declspec is not recognized by the midl compiler so importing the __m128 data type is out of the question. I looked into using wire_marshal to do this but I think it needs to be aware of the typedef of the __m128 type. If there is a way I can foreword_declare XMVECTOR for use with wire_marshal I haven't the foggiest on how I would do so.
I have thought of hiding the type by encapsulating it which it will already be being that I am encapsulating data types for Reflection. I have played around with a few ideas here including inheriting from both COM and C++ interfaces. Nothing here looked too promising.
A lot of people have told me not to use COM and I honestly have spent a lot of hours not coding and just trying to figure this stuff out. My logic keeps seeing a whole lot of benefits to using COM and the alternatives including MyCOM look just as time consuming and riddled with problems. If this is my biggest problem with using COM should I keep moving foreword or are the solutions going to slow down this application, keeping in mind its reliance on graphical presentation and real time computational modeling? I am looking into doing stuff on scale of rendering farms or clouds or something of the sort... I talk big and I know I am noob so please, not trying to impress just looking to become informed ... I have done a lot of research!
thx,
BekaD:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在我嘴里留下了一点有趣的味道:\
我会编辑它或将其添加为评论,但可能是该线程最接近的答案......可能是显而易见的......抱歉回答我的问题自己的问题:/
Leaves a bit of a funny taste in my mouth :\
I would have edited it in or added it as a comment but probably the closest this thread will come to an answer... probably the obvious one .... sorry for answering my own question :/