2009-08-19 16:44 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbwin/legacy.prg
! Deleted pointer to numeric conversions.
This means even code using compatibility interface may
have to be slightly adapted to use this version of Harbour.
Checks like ISNUMBER( CreateOLEObject() ) and CreateOLEObject() == 0
will have to be changed to Empty( CreateOLEObject() ). This
stays compatible with other Harbour versions and implementations.
Methods/Functions accepting numeric pointers in old implementation
will only accept pointers aquired from appropriate OLE API functions.
This commit is contained in:
@@ -17,6 +17,17 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-08-19 16:44 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbwin/legacy.prg
|
||||
! Deleted pointer to numeric conversions.
|
||||
This means even code using compatibility interface may
|
||||
have to be slightly adapted to use this version of Harbour.
|
||||
Checks like ISNUMBER( CreateOLEObject() ) and CreateOLEObject() == 0
|
||||
will have to be changed to Empty( CreateOLEObject() ). This
|
||||
stays compatible with other Harbour versions and implementations.
|
||||
Methods/Functions accepting numeric pointers in old implementation
|
||||
will only accept pointers aquired from appropriate OLE API functions.
|
||||
|
||||
2009-08-19 15:39 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/contrib/hbwin/olecore.c
|
||||
! updated for POCC/WinCE header files
|
||||
|
||||
@@ -73,6 +73,8 @@ STATIC PROCEDURE Throw( oError )
|
||||
Break( oError )
|
||||
RETURN
|
||||
|
||||
/* NOTE: xOle with numeric pointers isn't supported by this
|
||||
implementation. */
|
||||
CREATE CLASS TOLEAUTO FROM WIN_OLEAUTO
|
||||
/* TODO: Implement compatibility to the required extent */
|
||||
VAR cClassName
|
||||
@@ -83,9 +85,6 @@ ENDCLASS
|
||||
METHOD hObj( xOle ) CLASS TOLEAUTO
|
||||
|
||||
IF PCount() > 0 .AND. xOle != NIL
|
||||
IF ISNUMBER( xOle )
|
||||
xOle := win_N2P( xOle )
|
||||
ENDIF
|
||||
IF hb_isPointer( xOle )
|
||||
::__hObj := xOle
|
||||
ENDIF
|
||||
@@ -97,10 +96,6 @@ METHOD New( xOle, cClass ) CLASS TOLEAUTO
|
||||
LOCAL hOle
|
||||
LOCAL oError
|
||||
|
||||
IF ISNUMBER( xOle )
|
||||
xOle := win_N2P( xOle )
|
||||
ENDIF
|
||||
|
||||
IF hb_isPointer( xOle )
|
||||
::__hObj := xOle
|
||||
IF ISCHARACTER( cClass )
|
||||
@@ -140,10 +135,6 @@ FUNCTION GetActiveObject( xOle, cClass )
|
||||
LOCAL hOle
|
||||
LOCAL oError
|
||||
|
||||
IF ISNUMBER( xOle )
|
||||
xOle := win_N2P( xOle )
|
||||
ENDIF
|
||||
|
||||
IF hb_isPointer( xOle )
|
||||
o:__hObj := xOle
|
||||
IF ISCHARACTER( cClass )
|
||||
@@ -175,8 +166,12 @@ FUNCTION GetActiveObject( xOle, cClass )
|
||||
|
||||
RETURN o
|
||||
|
||||
/* NOTE: This will return a pointer type, as opposed to the old
|
||||
implementation which returned a numeric one. Since this
|
||||
is a GC collected pointer, there is no way to convert it
|
||||
to numeric and later reconvert to pointer. */
|
||||
FUNCTION CreateOLEObject( ... )
|
||||
RETURN win_P2N( __OleCreateObject( ... ) )
|
||||
RETURN __OleCreateObject( ... )
|
||||
|
||||
CREATE CLASS Win32Prn FROM WIN_PRN
|
||||
ENDCLASS
|
||||
|
||||
Reference in New Issue
Block a user