Just upgraded to 3.0.38, but have problem...
Moderator: Rathinagiri
Re: Just upgraded to 3.0.38, but have problem...
Hi guys,
I find the solution: the problems seem to come from nightly version. This version is target as 3.1.x rev. 169.... that is different from official 3.0.0 rev. 16951.
I don't know exactly where is the problem, but I can't find "FREELIBRARY" and "TOLEAUTO" with nightly version.
Cheers
I find the solution: the problems seem to come from nightly version. This version is target as 3.1.x rev. 169.... that is different from official 3.0.0 rev. 16951.
I don't know exactly where is the problem, but I can't find "FREELIBRARY" and "TOLEAUTO" with nightly version.
Cheers
Luigi from Italy
www.L3W.it
www.L3W.it
Re: Just upgraded to 3.0.38, but have problem...
Hi Luigi,l3whmg wrote:Hi guys,
I find the solution: the problems seem to come from nightly version. This version is target as 3.1.x rev. 169.... that is different from official 3.0.0 rev. 16951.
I don't know exactly where is the problem, but I can't find "FREELIBRARY" and "TOLEAUTO" with nightly version.
You are right

These functions were moved to legacy source of hbwin library and they were erased in the current harbour 3.1.0dev build after cleanup of the legacy codes.
Hope that helps.

Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Re: Just upgraded to 3.0.38, but have problem...
Hi Grigory, many thanks for your info. As usual, you are very prepared
Cheers

Cheers
Luigi from Italy
www.L3W.it
www.L3W.it
- Rathinagiri
- Posts: 5480
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Just upgraded to 3.0.38, but have problem...
Thanks for the info Grigory.
In that case, where can we find these functionalities? Are they modernized and included in Harbour elsewhere?
In that case, where can we find these functionalities? Are they modernized and included in Harbour elsewhere?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: Just upgraded to 3.0.38, but have problem...
Hi Rathi,rathinagiri wrote:...
where can we find these functionalities?
There is a new class WIN_OLEAUTO instead of old TOleAuto() in the Harbour contrib HBWIN library.
You can uncomment also the function FreeLibrary() in the HMG source file c_winapimisc.c as below
Code: Select all
HB_FUNC( FREELIBRARY )
{
FreeLibrary( (HMODULE) hb_parnl( 1 ) ) ;
}

Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Re: Just upgraded to 3.0.38, but have problem...
Rathi,
BTW you can look for full source of implementation of class TOleAuto from a new WIN_OLEAUTO below:
BTW you can look for full source of implementation of class TOleAuto from a new WIN_OLEAUTO below:
#define HB_CLS_NOTOBJECT /* avoid definition of method: INIT */
#include "hbclass.ch"
#include "common.ch"
#include "error.ch"
#define EG_OLEEXCEPTION 1001
STATIC s_bBreak := { | oError | Break( oError ) }
STATIC PROCEDURE Throw( oError )
LOCAL lError := Eval( ErrorBlock(), oError )
IF ! ISLOGICAL( lError ) .OR. lError
__ErrInHandler()
ENDIF
Break( oError )
STATIC FUNCTION ThrowOpError( nSubCode, cOperator, ... )
LOCAL oError
oError := ErrorNew()
oError:Args := { ... }
oError:CanDefault := .F.
oError:CanRetry := .F.
oError:CanSubstitute := .T.
oError:Description := "argument error"
oError:GenCode := EG_ARG
oError:Operation := cOperator
oError:Severity := ES_ERROR
oError:SubCode := nSubCode
oError:SubSystem := "BASE"
RETURN Throw( oError )
CREATE CLASS TOLEAUTO FROM WIN_OLEAUTO
/* TODO: Implement compatibility to the required extent */
VAR cClassName
METHOD New( xOle, cClass )
METHOD hObj( xOle )
METHOD OleValuePlus( xArg ) OPERATOR "+"
METHOD OleValueMinus( xArg ) OPERATOR "-"
METHOD OleValueMultiply( xArg ) OPERATOR "*"
METHOD OleValueDivide( xArg ) OPERATOR "/"
METHOD OleValueModulus( xArg ) OPERATOR "%"
METHOD OleValuePower( xArg ) OPERATOR "^"
METHOD OleValueInc() OPERATOR "++"
METHOD OleValueDec() OPERATOR "--"
METHOD OleValueEqual( xArg ) OPERATOR "="
METHOD OleValueExactEqual( xArg ) OPERATOR "=="
METHOD OleValueNotEqual( xArg ) OPERATOR "!="
ENDCLASS
METHOD hObj( xOle ) CLASS TOLEAUTO
IF PCount() > 0 .AND. xOle != NIL
IF ISNUMBER( xOle )
xOle := __OLEPDISP( xOle )
ENDIF
IF hb_isPointer( xOle )
::__hObj := xOle
ENDIF
ENDIF
RETURN ::__hObj
METHOD New( xOle, cClass ) CLASS TOLEAUTO
LOCAL hOle
LOCAL oError
IF ISNUMBER( xOle )
xOle := __OLEPDISP( xOle )
ENDIF
IF hb_isPointer( xOle )
::__hObj := xOle
IF ISCHARACTER( cClass )
::cClassName := cClass
ELSE
::cClassName := hb_ntos( win_P2N( xOle ) )
ENDIF
ELSEIF ISCHARACTER( xOle )
hOle := __OleCreateObject( xOle )
IF ! Empty( hOle )
::__hObj := hOle
::cClassName := xOle
ELSE
oError := ErrorNew()
oError:Args := hb_AParams()
oError:CanDefault := .F.
oError:CanRetry := .F.
oError:CanSubstitute := .T.
oError:Description := win_OleErrorText()
oError:GenCode := EG_OLEEXCEPTION
oError:Operation := ProcName()
oError:Severity := ES_ERROR
oError:SubCode := -1
oError:SubSystem := "TOleAuto"
RETURN Throw( oError )
ENDIF
ENDIF
RETURN Self
FUNCTION CreateObject( xOle, cClass )
RETURN TOleAuto():New( xOle, cClass )
FUNCTION GetActiveObject( xOle, cClass )
LOCAL o := TOleAuto():New()
LOCAL hOle
LOCAL oError
IF ISNUMBER( xOle )
xOle := __OLEPDISP( xOle )
ENDIF
IF hb_isPointer( xOle )
o:__hObj := xOle
IF ISCHARACTER( cClass )
o:cClassName := cClass
ELSE
o:cClassName := hb_ntos( win_P2N( xOle ) )
ENDIF
ELSEIF ISCHARACTER( xOle )
hOle := __OleGetActiveObject( xOle )
IF ! Empty( hOle )
o:__hObj := hOle
o:cClassName := xOle
ELSE
oError := ErrorNew()
oError:Args := hb_AParams()
oError:CanDefault := .F.
oError:CanRetry := .F.
oError:CanSubstitute := .T.
oError:Description := win_OleErrorText()
oError:GenCode := EG_OLEEXCEPTION
oError:Operation := ProcName()
oError:Severity := ES_ERROR
oError:SubCode := -1
oError:SubSystem := "TOleAuto"
RETURN Throw( oError )
ENDIF
ENDIF
RETURN o
METHOD OleValuePlus( xArg ) CLASS TOLEAUTO
LOCAL xRet
BEGIN SEQUENCE WITH s_bBreak
xRet := ::OleValue + xArg
RECOVER
RETURN ThrowOpError( 1081, "+", Self, xArg )
END SEQUENCE
RETURN xRet
METHOD OleValueMinus( xArg ) CLASS TOLEAUTO
LOCAL xRet
BEGIN SEQUENCE WITH s_bBreak
xRet := ::OleValue - xArg
RECOVER
RETURN ThrowOpError( 1082, "-", Self, xArg )
END SEQUENCE
RETURN xRet
METHOD OleValueMultiply( xArg ) CLASS TOLEAUTO
LOCAL xRet
BEGIN SEQUENCE WITH s_bBreak
xRet := ::OleValue * xArg
RECOVER
RETURN ThrowOpError( 1083, "*", Self, xArg )
END SEQUENCE
RETURN xRet
METHOD OleValueDivide( xArg ) CLASS TOLEAUTO
LOCAL xRet
BEGIN SEQUENCE WITH s_bBreak
xRet := ::OleValue / xArg
RECOVER
RETURN ThrowOpError( 1084, "/", Self, xArg )
END SEQUENCE
RETURN xRet
METHOD OleValueModulus( xArg ) CLASS TOLEAUTO
LOCAL xRet
BEGIN SEQUENCE WITH s_bBreak
xRet := ::OleValue % xArg
RECOVER
RETURN ThrowOpError( 1085, "%", Self, xArg )
END SEQUENCE
RETURN xRet
METHOD OleValuePower( xArg ) CLASS TOLEAUTO
LOCAL xRet
BEGIN SEQUENCE WITH s_bBreak
xRet := ::OleValue ^ xArg
RECOVER
RETURN ThrowOpError( 1088, "^", Self, xArg )
END SEQUENCE
RETURN xRet
METHOD OleValueInc() CLASS TOLEAUTO
BEGIN SEQUENCE WITH s_bBreak
++::OleValue
RECOVER
RETURN ThrowOpError( 1086, "++", Self )
END SEQUENCE
RETURN Self
METHOD OleValueDec() CLASS TOLEAUTO
BEGIN SEQUENCE WITH s_bBreak
--::OleValue
RECOVER
RETURN ThrowOpError( 1087, "--", Self )
END SEQUENCE
RETURN Self
METHOD OleValueEqual( xArg ) CLASS TOLEAUTO
LOCAL xRet
BEGIN SEQUENCE WITH s_bBreak
xRet := ( ::OleValue = xArg ) /* NOTE: Intentionally using '=' operator. */
RECOVER
RETURN ThrowOpError( 1089, "=", Self, xArg )
END SEQUENCE
RETURN xRet
METHOD OleValueExactEqual( xArg ) CLASS TOLEAUTO
LOCAL xRet
BEGIN SEQUENCE WITH s_bBreak
xRet := ( ::OleValue == xArg )
RECOVER
RETURN ThrowOpError( 1090, "==", Self, xArg )
END SEQUENCE
RETURN xRet
METHOD OleValueNotEqual( xArg ) CLASS TOLEAUTO
LOCAL xRet
BEGIN SEQUENCE WITH s_bBreak
xRet := ( ::OleValue != xArg )
RECOVER
RETURN ThrowOpError( 1091, "!=", Self, xArg )
END SEQUENCE
RETURN xRet
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
- Rathinagiri
- Posts: 5480
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Just upgraded to 3.0.38, but have problem...
Thanks a lot Grigory Filatov. Great!
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: Just upgraded to 3.0.38, but have problem...
Hello Rathi,
I found problem when compiling one of my old projects with 3.0.38 I am not sure, whether I missed something for report library or not.
Thanks.
I found problem when compiling one of my old projects with 3.0.38 I am not sure, whether I missed something for report library or not.
Thanks.
With best regards,
Sudip
Sudip
- danielmaximiliano
- Posts: 2625
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: Just upgraded to 3.0.38, but have problem...
Hi Sudip:
which library you use in your old application??
You can add a portion of the source where the error is generated
which library you use in your old application??
You can add a portion of the source where the error is generated
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
- Rathinagiri
- Posts: 5480
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Just upgraded to 3.0.38, but have problem...
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.