IDL problem : setting Interface inside or outside typelib / Proxy stub vs Aggregation 
Author Message
 IDL problem : setting Interface inside or outside typelib / Proxy stub vs Aggregation

Hello everyone and thanks for the help with my connection point
problem last month.

I have an other one to submit to you.

We've built an object which uses structs containing arrays of structs.
In order to communicate with other components, we use standard
Marshalling.
In order to build the Proxy stub we need to define the interface
outside of the type library orelse
the "XXXX_p.c" and the "dlldata.c" files aren't generated by MIDL.

At the same time, we need this object A to be aggregated in another
object B.
If the interface of A is not defined in the typelib with all the
structs, the interface is not available in
the type library of B.
So we can't query for this interface when using B.

Do you know of any way to do that?



Sun, 02 Oct 2005 14:08:53 GMT  
 IDL problem : setting Interface inside or outside typelib / Proxy stub vs Aggregation
What does the TLB have to do with QueryInterface? It's normal
if you never define such an interface in a type library (does more
harm than good), but as long as you have the proxy/stub DLL,
you are fine. This is of absolutely no concern for aggregation
though, because aggregation doesn't work when marshaling
is necessary!

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================

Quote:

> Hello everyone and thanks for the help with my connection point
> problem last month.

> I have an other one to submit to you.

> We've built an object which uses structs containing arrays of structs.
> In order to communicate with other components, we use standard
> Marshalling.
> In order to build the Proxy stub we need to define the interface
> outside of the type library orelse
> the "XXXX_p.c" and the "dlldata.c" files aren't generated by MIDL.

> At the same time, we need this object A to be aggregated in another
> object B.
> If the interface of A is not defined in the typelib with all the
> structs, the interface is not available in
> the type library of B.
> So we can't query for this interface when using B.

> Do you know of any way to do that?



Mon, 03 Oct 2005 01:59:41 GMT  
 IDL problem : setting Interface inside or outside typelib / Proxy stub vs Aggregation
Well, aggregator and aggregatee have to be in the same apartment, but I
don't think there is anything to prevent the aggregator to expose an
interface from the aggregatee as its own to the out-of-apartment client.
I guess that's what the OP is worried about.

It's still not clear what exactly TLB has to do with it though.
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Quote:
> aggregation doesn't work when marshaling is necessary!




Quote:
> Hello everyone and thanks for the help with my connection point
> problem last month.

> I have an other one to submit to you.

> We've built an object which uses structs containing arrays of structs.
> In order to communicate with other components, we use standard
> Marshalling.
> In order to build the Proxy stub we need to define the interface
> outside of the type library orelse
> the "XXXX_p.c" and the "dlldata.c" files aren't generated by MIDL.

> At the same time, we need this object A to be aggregated in another
> object B.
> If the interface of A is not defined in the typelib with all the
> structs, the interface is not available in
> the type library of B.
> So we can't query for this interface when using B.

> Do you know of any way to do that?



Mon, 03 Oct 2005 02:41:03 GMT  
 IDL problem : setting Interface inside or outside typelib / Proxy stub vs Aggregation

Quote:

> Do you know of any way to do that?

If I understood you, then you can replace "interface Ixxx;" in
[library] statement. Like this

[...]
interface Ixxx ...
{
...

Quote:
};

...
[...]
library XXXLib
{
...
interface Ixxx;
...

Quote:
};

You will have both the proxy code of Ixxx interface and the TLB
typeinfo of it.

HTH



Mon, 03 Oct 2005 14:13:38 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. COM - standard proxy/stub marshalling VS typelib marshalling ?

2. COM - standard proxy/stub marshalling VS typelib marshalling ?

3. Proxy Stub DLL from just an IDL file??

4. Interface disappears from Typelib and IDL file...

5. Outgoing interface & proxy/stub

6. Interface definition outside of Library in .IDL

7. Proxy Stub Problem with Visual C++ 7

8. Proxy/Stub dll problem...

9. Merge Proxy/stub problem

10. marshalling proxy/stub problem?

11. Problem building proxy-stub DLL

12. Problem reusing idl interface with VC++.NET (nested interfaces)

 

 
Powered by phpBB® Forum Software