tags:

views:

13

answers:

1

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:

A: 

Leaves a bit of a funny taste in my mouth :\

typedef XMVECTOR* PTR_XMVECTOR;

typedef struct _ARRAY_XMVECTOR {
        unsigned int size_array;
        [size_is(size_array*SIZE_OF_XMVECTOR)] PTR_XMVECTOR VECTOR_ARRAY;
    } ARRAY_XMVECTOR;

typedef [wire_marshal(MARSHAL_AS)] ARRAY_XMVECTOR MY_VECTOR_ARRAY;

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 :/

PrettyFlower