FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index Off Topic / Otros temas harbour actual
Posts: 670
Joined: Wed Oct 19, 2005 06:41 PM
harbour actual
Posted: Thu May 19, 2016 11:23 PM
Buenas tardes
tengo un programa de consola funcionando bien con xharbour 1.5 o algo asi, deseo comilar con el harbour actual y me da este error o warning

\wilson\inves\w1seek.prg:26: warning: initialization discards 'const' quali
fier from pointer target type
char * cStr = hb_parc( 1 );
^

la funcion ala que se refiere es

Code (fw): Select all Collapse
        HB_FUNC ( COPY2CLIPBOARD )
        {
           HGLOBAL hglbCopy;
           char * lptstrCopy;
           char * cStr = hb_parc( 1 );
           int nLen = strlen( cStr );


           if ( !OpenClipboard( GetActiveWindow() ) )
              return;

           EmptyClipboard();

           hglbCopy = GlobalAlloc( GMEM_DDESHARE, (nLen+1) * sizeof(TCHAR) );
           if (hglbCopy == NULL)
           {
               CloseClipboard();
               return;
           }


alguna alma caritativa me puede ayudar a resolver ese error
gracias

Wilson
Wilson 'W' Gamboa A
Wilson.josenet@gmail.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: harbour actual
Posted: Fri May 20, 2016 07:51 AM

Wilson,

char * cStr = ( char * ) hb_parc( 1 );

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: harbour actual
Posted: Fri May 20, 2016 08:44 AM
Antonio Linares wrote:char * cStr = ( char * ) hb_parc( 1 );


Or better:

Code (fw): Select all Collapse
const char * cStr = hb_parc( 1 );


EMG
Posts: 670
Joined: Wed Oct 19, 2005 06:41 PM
Re: harbour actual
Posted: Fri May 20, 2016 02:00 PM

Wow excelente funciono de maravilla
Gracias Maestro Antonio y Enrico
saludos

Wilson

Wilson 'W' Gamboa A
Wilson.josenet@gmail.com

Continue the discussion