a method, which param is an interface? can i?? 
Author Message
 a method, which param is an interface? can i??

hi,all.
     i have a com project ( com + activex ), it has more
than two com objects, and some of them need interactive
each other, the container is IE.
     in container, i use JScript to create and manupleate
the objects, for example:
     <OBJECT id=main_ctrl width = .. height.. clsid...></OBJECT>
     <script language=jscript>
     main_ctrl.init_something(...);
     </script>
     the method : main_ctrl( MyDataStreamObj dso) need an
com object, i can create the com object in jscrip and ...
     dso = new ActiveXObject("XXX.MyDataStreamObj");
     dso.Init(...);
     main_ctrl.init_something(dso);
     now, i have a question:
     how to declare this method and how to implement it??
i found that the ATL class wizard doesn't support a com object
as a method's param. how can i?


Thu, 23 Sep 2004 11:12:14 GMT  
 a method, which param is an interface? can i??
Do you mean "AddMethod" wizard? You should pass an interface pointer as your
method's param, not 'com object'. You can define a methos that takes
IDispatch* and does QI to query the interface it actually needs.

HTH,

Vladimir Scherbakov


Quote:
> hi,all.
>      i have a com project ( com + activex ), it has more
> than two com objects, and some of them need interactive
> each other, the container is IE.
>      in container, i use JScript to create and manupleate
> the objects, for example:
>      <OBJECT id=main_ctrl width = .. height.. clsid...></OBJECT>
>      <script language=jscript>
>      main_ctrl.init_something(...);
>      </script>
>      the method : main_ctrl( MyDataStreamObj dso) need an
> com object, i can create the com object in jscrip and ...
>      dso = new ActiveXObject("XXX.MyDataStreamObj");
>      dso.Init(...);
>      main_ctrl.init_something(dso);
>      now, i have a question:
>      how to declare this method and how to implement it??
> i found that the ATL class wizard doesn't support a com object
> as a method's param. how can i?



Sat, 25 Sep 2004 10:43:35 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Custom Interface [out] param in an event method

2. Howto interpret method param as verbatim string?

3. calling an interface method from another method in the same class

4. Calling one Interface method into another Interface

5. Default param values thru interfaces

6. (Q)How to use POINT as param in Interface function

7. calling COM interface requiring [out] VARIANT* param...?

8. Event interface over the internet - am I INSANE?

9. interface pointer as a param of a method, how to support VB?

10. Calling a class member's interface method from a non interface method on the parent class

11. Determining what canned preprocessor symbols are available

12. Beginner [Q] Using Canned File Open/Save dialog

 

 
Powered by phpBB® Forum Software