harbour actual

harbour actual

Postby wilsongamboa » 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: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  Expand view
       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
wilsongamboa
 
Posts: 593
Joined: Wed Oct 19, 2005 6:41 pm
Location: Quito - Ecuador

Re: harbour actual

Postby Antonio Linares » Fri May 20, 2016 7:51 am

Wilson,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: harbour actual

Postby Enrico Maria Giordano » Fri May 20, 2016 8:44 am

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


Or better:

Code: Select all  Expand view
const char * cStr = hb_parc( 1 );


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: harbour actual

Postby wilsongamboa » Fri May 20, 2016 2:00 pm

Wow excelente funciono de maravilla
Gracias Maestro Antonio y Enrico
saludos

Wilson
Wilson 'W' Gamboa A
Wilson.josenet@gmail.com
User avatar
wilsongamboa
 
Posts: 593
Joined: Wed Oct 19, 2005 6:41 pm
Location: Quito - Ecuador


Return to Off Topic / Otros temas

Who is online

Users browsing this forum: No registered users and 25 guests