Page 1 of 1

Ayuda con función I2HEX

PostPosted: Tue Sep 05, 2017 2:50 am
by ricardog
Buenas noches, tengo un modulo para que utiliza la función I2HEX, pero me manda el siguiente error de ejecución.
[img][IMG]http://img220.imagevenue.com/loc617/th_558997966_ErrorI2HEX_122_617lo.jpg[/img][/img]

Y mi proyecto contiene la FIVEHC.LIB

[img][img=http://img237.imagevenue.com/loc471/th_559347689_errormaindllp.c_122_471lo.jpg][/img]

Gracias por su ayuda. :) :) :)

Re: Ayuda con función I2HEX

PostPosted: Tue Sep 05, 2017 7:21 am
by Antonio Linares
I2Hex() es una función de FWH

Que versión de FWH estás usando ?

Re: Ayuda con función I2HEX

PostPosted: Tue Sep 05, 2017 9:57 pm
by ricardog
Buenas tardes Antonio, FWHX 9.11

Re: Ayuda con función I2HEX

PostPosted: Wed Sep 06, 2017 5:55 am
by Antonio Linares
Necesitas actualizarte a una versión más reciente

Mientras tanto aqui tienes el código:
Code: Select all  Expand view
static char * u2Hex( WORD wWord )
{
    static far char szHex[ 5 ];

    WORD i= 3;

    do
    {
        szHex[ i ] = 48 + ( wWord & 0x000F );

        if( szHex[ i ] > 57 )
            szHex[ i ] += 7;

        wWord >>= 4;

    } while( i-- > 0 );

    szHex[ 4 ] = 0;

    return szHex;
}

//----------------------------------------------------------------------------//

HB_FUNC( I2HEX ) // nValue --> cHexValue
{
  hb_retc( u2Hex( hb_parni( 1 ) ) );
}