Hi Antonio,

You're right, I missed that. In this case the problem is
bigger and AFAICS accepting numeric pointers cannot be
implemented in a clean way. Probably an RTE should be
thrown in this case or an error returned to help catch this
case.

[ Or maybe someone has a better idea which fits in current
OLE implementation. ]

Brgds,
Viktor

On 2009.08.19., at 4:02, Antonio Linares wrote:

Viktor,

Recently you modified contrib\hbwin\legacy.prg and added this code to
support Windows (numeric) handles for creating an oleauto object:

  IF ISNUMBER( xOle )   // xOle is a pDisp
     xOle := win_N2P( xOle )
  ENDIF

But OleAuto uses this code from __OleCreateObject():

     ppDisp = ( IDispatch** ) hb_gcAlloc( sizeof( IDispatch* ),
hb_ole_destructor );
     *ppDisp = pDisp;
     hb_retptrGC( ppDisp );

which it is different from  the pointer created by win_N2P().

So the call to hb_oleParam( -1 ) fails as the pointer containt is different.

I may be missing something. I appreciate your comments, thanks

Antonio Linares
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to