Lo logr茅 :D
Instalando el VS Community 2022
Con el .bat
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
D:\Sistemas\Compiler\HarbourVS\bin\hbmk2 data\prg\proyectoVS.hbp -comp=msvc -run
Intentar茅 hacerlo portable para no tenerlo instalado :)
Me sali贸 茅ste error: warning C4996: 'inet_addr': Use inet_pton() or InetPton() instead or defin
En 茅sta funci贸n
#pragma BEGINDUMP
#include <hbapi.h>
#include <winsock2.h>
#include <iphlpapi.h>
#include <icmpapi.h>
int hb_Ping( const char * cp )
{
聽 聽 HANDLE hIcmpFile;
聽 聽 unsigned long ipaddr;
聽 聽 DWORD dwRetVal;
聽 聽 char SendData[32] = "Data Buffer";
聽 聽 LPVOID ReplyBuffer;
聽 聽 DWORD ReplySize;
聽 聽 ipaddr = inet_addr( cp ); 聽//El error lo da en 茅sta l铆nea
聽 聽 if (ipaddr == INADDR_NONE)
聽 聽 聽 聽 return 1;
聽 聽
聽 聽 hIcmpFile = IcmpCreateFile();
聽 聽 if (hIcmpFile == INVALID_HANDLE_VALUE)
聽 聽 聽 聽 return 2;
聽 聽 ReplySize = sizeof(ICMP_ECHO_REPLY) + sizeof(SendData);
聽 聽 ReplyBuffer = (VOID*) malloc(ReplySize);
聽 聽 if (ReplyBuffer == NULL)
聽 聽 聽 聽 return 3;
聽 聽 聽 聽 dwRetVal = IcmpSendEcho(hIcmpFile, ipaddr, SendData, sizeof(SendData),
聽 聽 聽 聽 NULL, ReplyBuffer, ReplySize, 1000);
聽 聽 if (dwRetVal == 0)
聽 聽 聽 聽 return 4;
聽 聽 return 0;
}
HB_FUNC( HB_PING )
{
聽 聽hb_retni( hb_Ping( hb_parc( 1 ) ) );
}
#pragma ENDDUMP
Y 茅stos otros:
hbct.lib(dattime3.obj) : error LNK2005: ya se defini贸 _HB_FUN_SETTIME en fivehc32.lib(DATETIME.obj)
hbct.lib(dattime3.obj) : error LNK2005: ya se defini贸 _HB_FUN_SETDATE en fivehc32.lib(DATETIME.obj)
En 茅sta funci贸n:
Function FtpFecha(cFile,cFtpSite,cUsuario,cPass)
聽 oInt:=tInternet():New()
聽 oFtp:=tFtp():New(cFtpSite,oInt,cUsuario,cPass)
聽
聽 IF !Empty(oFtp:hFtp)
聽 聽 聽aFiles:=oFtp:Directory(cFile)
聽 聽 聽IF Len(aFiles)>0 聽 聽 聽 聽
聽 聽 聽 聽 HoraNew:= aFiles[1,4]
聽 聽 聽 聽 FtpFecExeNew:=dToS(aFiles[1,3])+Left(HoraNew,2)+Subs(HoraNew,4,2)+Right(HoraNew,2)
聽 聽 聽 Endif
聽 Else
聽 聽 聽 聽FtpFecExeNew:=""
聽 EndIf
聽Return FtpFecExeNew
Por ahora las he puesto en comentario :(
Gracias por la ayuda