Passing Complex Types in COM

Discussion in 'C++' started by PrettyFlower, Jul 1, 2010.

  1. PrettyFlower

    PrettyFlower New Member

    Joined:
    Jul 1, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    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 are ways to foreword_declare XMVECTOR for use with wire_marshal I haven't the foggiest on what they are.

    I have thought of hiding the type by encapsulating it which I am am already doing in the Reflection system I am developing. I have played around with a few ideas here including inheriting from both COM and C++ interfaces. This would involve marshaling as POD types over boundaries and marshaling out the data to be stored(persistence) under COM and in-process and in object manipulation via C++ interface... Nothing here looked too safe and/or promising.

    I keep saying this all over the intrawebs but.... 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 mean if I have a COM Object that is a model, another that is the math library and another that is the physics, if I have to communicate through all this, well..... I guess I have been told....

    I am looking into doing stuff on the scale of rendering farms or clouds or something of the sort... So I guess I am looking for a solution where simmed instructions could be performed at near efficiency between COM objects in-process but also be capable of performing under marshalling over a network or between processes....

    I talk big and I know I am noob so please, not trying to impress just looking to become informed(aka don't hurt me *insert duck and cover*) ... I have done a lot of research!

    thx, BekaD:
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice