Muito obrigado.
Vou adaptar FWH\samples\buildx.bat para construirlo e testar.
Eu uso VERCE v5.3 para construir. Não devo usar mais o VERCE??
Saludos
Jufer
/*
╔════════════════════════════════════════════════════════════════════════╗
║ Program......: TGather.prg ║
║ Date.........: 01/15/96 ║
║ Author.......: ANTONIO ALVAREZ ║
║ Compiler.....: Clipper Ver 5.2e ║
╚════════════════════════════════════════════════════════════════════════╝
*/
// #include 'Objects.ch'
CLASS TGather
DATA cAlias AS CHARACTER
DATA aFields AS ARRAY
DATA dFields AS ARRAY
DATA lBuffer AS LOGICAL
METHOD New( lBuffer )
METHOD AddIndex( cOrderBagName, cOrderName )
METHOD ClearIndex()
METHOD SetOrder( cnOrder, cOrderBagName )
METHOD FieldGet( nField ) INLINE ( ::cAlias )->( FieldGet( nField ) )
METHOD FieldPut( nFld, uVal) INLINE ( ::cAlias )->( FieldPut( nFld, uVal ) )
METHOD Gather()
METHOD Scatter()
METHOD Blank()
METHOD Seek( cKey )
METHOD RecNo() INLINE ( ::cAlias )->( RecNo() )
METHOD LastRec() INLINE ( ::cAlias )->( LastRec() )
METHOD Eof() INLINE ( ::cAlias )->( Eof() )
METHOD Bof() INLINE ( ::cAlias )->( Bof() )
METHOD GoTo( nRecord )
METHOD GoFirst()
METHOD GoLast()
METHOD Skip( nRecords )
METHOD Delete() INLINE ( ::cAlias )->( DbDelete() )
METHOD Used() INLINE ( ::cAlias )->( Used() )
METHOD Commit()
METHOD Lock() INLINE ( ::cAlias )->( RLock() )
METHOD UnLock()
METHOD Close()
METHOD DUPLICA()
ENDCLASS
//------------------------------------------------------------------//
METHOD New( lBuffer ) CLASS TGather
::cAlias := Alias()
::aFields := Array( ( ::cAlias )->( FCount() ) )
IF ( lBuffer == NIL )
::lBuffer := .T.
ELSE
::lBuffer := lBuffer
ENDIF
::Blank()
RETURN ( Self )
//------------------------------------------------------------------//
METHOD Gather() CLASS TGather
LOCAL i := 0
IF ( ::lBuffer )
FOR i = 1 to ( ::cAlias )->( FCount() )
::aFields[i] := ::FieldGet(i)
NEXT
ENDIF
RETURN ( NIL )
//------------------------------------------------------------------//
METHOD AddIndex( cOrderBagName, cOrderName ) CLASS TGather
( ::cAlias )->( OrdListAdd( cOrderBagName, cOrderName ) )
RETURN ( NIL )
* METHOD AddIndex( aInxDef ) CLASS TDbf
* aAdd( ::aIndex, aInxDef )
* ::lIndex := .t.
* return( nil )
//------------------------------------------------------------------//
METHOD ClearIndex() CLASS TGather
( ::cAlias )->( OrdListClear() )
RETURN ( NIL )
//------------------------------------------------------------------//
METHOD SetOrder( cnOrder, cOrderBagName ) CLASS TGather
( ::cAlias )->( OrdSetFocus( cnOrder, cOrderBagName ) )
RETURN ( NIL )
//------------------------------------------------------------------//
METHOD Scatter() CLASS TGather
LOCAL i := 0
IF ( ::lBuffer )
FOR i = 1 to ( ::cAlias )->( FCount() )
::FieldPut(i, ::aFields[i])
NEXT
ENDIF
RETURN ( NIL )
//------------------------------------------------------------------//
METHOD Blank() CLASS TGather
LOCAL i := 0
IF ( ::lBuffer )
FOR i = 1 to ( ::cAlias )->( FCount() )
::aFields[i] := ShowGet( ::FieldGet(i) )
NEXT
ENDIF
RETURN ( Nil )
//------------------------------------------------------------------//
METHOD Seek( cKey ) CLASS TGather
LOCAL lRet := .T., nRec := ::Recno()
IF ( ::cAlias )->( DbSeek( cKey ) )
::Gather()
ELSE
::GoTo( nRec )
lRet := .F.
ENDIF
RETURN ( lRet )
//------------------------------------------------------------------//
METHOD GoTo( nRecord ) CLASS TGather
( ::cAlias )->( DbGoTo( nRecord ) )
RETURN ( NIL )
//------------------------------------------------------------------//
METHOD Skip( nRecords ) CLASS TGather
( ::cAlias )->( DbSkip( nRecords ) )
IF ( ::cAlias )->( Eof() )
( ::cAlias )->( DbSkip( -1 ) )
ENDIF
::Gather()
RETURN ( NIL )
//------------------------------------------------------------------//
METHOD GoFirst() CLASS TGather
( ::cAlias )->( DbGoTop() )
::Gather()
RETURN ( NIL )
//------------------------------------------------------------------//
METHOD GoLast() CLASS TGather
( ::cAlias )->( DbGoBottom() )
::Gather()
RETURN ( NIL )
//------------------------------------------------------------------//
METHOD Commit() CLASS TGather
( ::cAlias )->( DbCommit() )
RETURN ( NIL )
//------------------------------------------------------------------//
METHOD UnLock() CLASS TGather
::Commit()
( ::cAlias )->( DbrUnLock() )
RETURN ( NIL )
//------------------------------------------------------------------//
METHOD Close() CLASS TGather
( ::cAlias )->( DbCloseArea() )
RETURN ( NIL )
//------------------------------------------------------------------//
FUNCTION ShowGet( cField )
LOCAL xRetVal := ""
IF ValType(cField) == "C"
xRetVal := Space( Len( cField ) )
ELSEIF ValType( cField ) == "N"
xRetVal := 0
ELSEIF ValType( cField ) == "D"
xRetVal := CtoD("")
ELSEIF ValType( cField ) == "L"
xRetVal := .F.
ENDIF
RETURN ( xRetVal )
************************************************
* Funcion de copiar datos
************************************************
*/
METHOD duplica() CLASS TGather
LOCAL i := 0
::dFields := Array( ( ::cAlias )->( FCount() ) )
IF ( ::lBuffer )
FOR i = 1 to ( ::cAlias )->( FCount() )
::dFields[i] := ::FieldGet(i)
NEXT
FOR i = 1 to ( ::cAlias )->( FCount() )
::aFields[i] :=ShowGet ( ::FieldGet(i) )
NEXT
FOR i = 1 to ( ::cAlias )->( FCount() )
::aFields[i] := ::dFields[i]
NEXT
ENDIF
RETURN ( NIL )
local hBorland := LoadLibrary( "BWCC32.dll" )
BWCCRegister( GetResources() )
... el código de tu aplicación
DLL32 FUNCTION BWCCRegister( hInst AS LONG ) AS WORD PASCAL LIB "BWCC32.DLL"
Return to All products support
Users browsing this forum: No registered users and 8 guests