Page 1 of 1

setenvironmentVariable() de xH a H

Posted: Sun Aug 09, 2020 5:59 pm
by noe aburto
Saludos Foro

Esta función la usaba con xHarbour 1.2.3. y ahora con Harbour 3.0 me marca errores

Code: Select all

#pragma BEGINDUMP

#include <windows.h>

HB_FUNC( SETENVIRONMENTVARIABLE )
{
   hb_retl( SetEnvironmentVariable( (LPCSTR) hb_parcx( 1 ),
                                     (LPCSTR) hb_parcx( 2 )
                                     ) ) ;
}
#pragma ENDDUMP
 
Warning W8065 MAUFUNC.PRG 166: Call to function 'hb_parcx' with no prototype in function HB_FUN_SETENVIRONMENTVARIABLE
Warning W8065 MAUFUNC.PRG 167: Call to function 'hb_parcx' with no prototype in function HB_FUN_SETENVIRONMENTVARIABLE
Warning W8065 MAUFUNC.PRG 168: Call to function 'hb_retl' with no prototype in function HB_FUN_SETENVIRONMENTVARIABLE
Error E2356 F:\Harbour\Include\hbapi.h 626: Type mismatch in redeclaration of 'hb_parcx'
Error E2356 F:\Harbour\Include\hbapi.h 686: Type mismatch in redeclaration of 'hb_retl'
Warning W8065 MAUFUNC.PRG 3693: Call to function 'hb_retl' with no prototype in function HB_FUN_VERCAPSLOCK
Warning W8065 MAUFUNC.PRG 3709: Call to function 'hb_retl' with no prototype in function HB_FUN_VERNUMLOCK
Warning W8065 MAUFUNC.PRG 3725: Call to function 'hb_retl' with no prototype in function HB_FUN_VERSCROLLOCK
Warning W8065 MAUFUNC.PRG 3741: Call to function 'hb_retl' with no prototype in function HB_FUN_VERINSERT

Lamentablemente respecto a funcione de xH y H, estoy perdido. Una ayuda....

Re: setenvironmentVariable() de xH a H

Posted: Sun Aug 09, 2020 7:22 pm
by noe aburto
Solucionado

solo agregue:

define "hbapi.h"