harbour actual

Post Reply
User avatar
wilsongamboa
Posts: 439
Joined: Wed Oct 19, 2005 6:41 pm
Location: Quito - Ecuador

harbour actual

Post by wilsongamboa »

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:4922:26: warning: initialization discards 'const' quali
fier from pointer target type
char * cStr = hb_parc( 1 );
^

la funcion ala que se refiere es

Code: Select all

        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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: harbour actual

Post by Antonio Linares »

Wilson,

char * cStr = ( char * ) hb_parc( 1 );
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: harbour actual

Post by Enrico Maria Giordano »

Antonio Linares wrote:char * cStr = ( char * ) hb_parc( 1 );
Or better:

Code: Select all

const char * cStr = hb_parc( 1 );
EMG
User avatar
wilsongamboa
Posts: 439
Joined: Wed Oct 19, 2005 6:41 pm
Location: Quito - Ecuador

Re: harbour actual

Post by wilsongamboa »

Wow excelente funciono de maravilla
Gracias Maestro Antonio y Enrico
saludos

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