Page 9 of 12
Re: NC Clone
Posted: Wed Sep 09, 2020 7:06 am
by danielmaximiliano
Hi Jimmy
download the version HBFM from Github to see where the FTP connection error is generated but when trying to compile it does not find os.ch in
Code: Select all
*+--------------------------------------------------------------------
*+
*+ Source Module => c:\hmg.3.4.4\0\HBFM\\HBEJECT.PRG
*+
*+ Copyright(C) 1983-2020 by Auge & Ohr
*+
*+ Functions: Procedure HBEJECT()
*+ Function EjectMedia()
*+ Static Function CreateVolHandle()
*+ Static Function LockVolume()
*+ Static Function DismountVolume()
*+ Static Function AutoEjectVolume()
*+ Static Function UnlockVolume()
*+ Static Function CloseVolume()
*+ Static Function PreventRemovalOfVolume()
*+ Static Function USB_DeviceColor()
*+ Static Function DO_DeviceImage()
*+ Static Function Do_DeviceAction()
*+ Static Function FillDeviceGrid()
*+ Static Procedure SayInfo()
*+
*+ Reformatted by Click! 2.05.30 on Aug-28-2020 at 1:52 am
*+
*+--------------------------------------------------------------------
#include "HMG.ch"
#include "common.ch"
#include "os.ch"
#include "dll.ch"
#include "EJECTDLL.CH"
#include "HBFM.CH"
- 2020-09-09 04_02_19-Window.png (30.18 KiB) Viewed 2535 times
Re: NC Clone
Posted: Wed Sep 09, 2020 8:00 am
by AUGE_OHR
danielmaximiliano wrote: ↑Wed Sep 09, 2020 5:02 am
with HBFM64 the application hangs entering 192.168.1.2:8556 without username and password or with username: anonimous, password: anoimous
I must use the windows Task Kill to kill the HBFM64 process
ooooooh ...
i must say that i have take Code from c:\MiniGUI\SAMPLES\Advanced\FtpClient\
Code: Select all
cUrl := cProtocol + Alltrim( cUser )+":"+ Alltrim( cPassWord ) +"@"+ alltrim( cServer)
oUrl := tURL():New( cUrl )
IF Empty( oUrl )
return nil
endif
oClient := TIpClientFtp():new( oUrl, Sites->Log ) && PARAM .T. TO LOG
IF Empty( oClient )
return nil
endif
oClient:nConnTimeout := 20000
oClient:bUsePasv := .T.
// Comprobamos si el usuario contiene una @ para forzar el userid
IF At( "@", cUser ) > 0
oClient:oUrl:cServer := cServer
oClient:oUrl:cUserID := cUser
oClient:oUrl:cPassword := cPassword
ENDIF
have to look deeper for tURL()
Re: NC Clone
Posted: Wed Sep 09, 2020 8:13 am
by AUGE_OHR
hi,
aaaaaaaaaaaaarrrrrrrrrg ... it is a Xbase++ Constant
Code: Select all
LOCAL nVersion := VAL( OS( OS_VERSION ) )
harbour does not have Constant as Parameter so i have to re-write that part.
THX that you found that Problem
Re: NC Clone
Posted: Wed Sep 09, 2020 1:25 pm
by danielmaximiliano
I had found information about OS () but did not find information about the content of os.ch
https://doc.alaska-software.com/content ... ef_os.html
without this file I can't compile the sources
TIP: when creating a new site it should contain an Anonimous checkbox or fill in the following fields
- Checkbox Anonimous.png (12.17 KiB) Viewed 2505 times
Code: Select all
IF xParam = NIL
newRecord := .f.
sites->( DBGOTO( sitemanager.browse_1.value ) )
editsitemanager.text_1.value := sites->name
editsitemanager.text_2.value := sites->address
editsitemanager.text_3.value := sites->user
editsitemanager.text_4.value := desencri( sites->password ) // decript
editsitemanager.text_5.value := Sites->SPath
editsitemanager.Check_2.value := Sites->Log
ELSE
newRecord := .t.
editsitemanager.text_3.value := "anonimous"
editsitemanager.text_4.value := "anonimous"
ENDIF
Re: NC Clone
Posted: Wed Sep 09, 2020 9:50 pm
by AUGE_OHR
hi
i have not upload OS.CH while it make no Sense ... OS() give me a String under harbour
Windows NT 10.0.19041
but i can´t find out Rest how to identify OS() ... just want to know if it is > Windows XP
---
about FTP Port
oUrl := TUrl():New( Server + ":" + hb_ntos( Port ) )
is that right
what is the default Port for FTP
Re: NC Clone
Posted: Wed Sep 09, 2020 10:48 pm
by danielmaximiliano
Hi Jimmy : from windows xp there is SystemInfo, its syntax is
systeminfo[.exe] [/s Computer [/u Domain\User [/p Password]]] [/fo {TABLE|LIST|CSV}] [/nh]
from CMD
systeminfo /fo list >SystemInfolist.log
You can also adapt to your convenience
https://github.com/breezechen/systeminf ... systeminfo
Note : ftp port is normally 21.
Re: NC Clone
Posted: Wed Sep 09, 2020 11:09 pm
by srvet_claudio
I don't remember now the name, but hmg has a function to get the os version. Search in the c source files for "osversion" or "version"
Re: NC Clone
Posted: Wed Sep 09, 2020 11:40 pm
by AUGE_OHR
! WARNING !
when play with sites.dbf i found a BIG BUG using Modi Stru.
it will DELETE new DBF when Name was in lower Letter
Re: NC Clone
Posted: Wed Sep 09, 2020 11:43 pm
by AUGE_OHR
hi,
i´m not sure how Syntax with Port work.
i saw this in c:\harbour\contrib\hbtip\tests\email.prg
Code: Select all
CASE ":" $ cHost
IF TUrl():New( cHost ):nPort != -1
nPort := TUrl():New( cHost ):nPort
ENDIF
lSTARTTLS := ( nPort == 587 )
cHost := TUrl():New( cHost ):cServer
so i change HbFTP to
Code: Select all
cUrl := cProtocol + ALLTRIM( cUser ) + ":" + ALLTRIM( cPassWord ) + "@" + ALLTRIM( cServer )
IF EMPTY(nPort)
oUrl := tURL() :New( cUrl )
ELSE
oUrl := tURL() :New( cUrl )+":"+hb_NTOS(nPort)
ENDIF
my Problem : don´t know how to test Port ...
Re: NC Clone
Posted: Wed Sep 09, 2020 11:52 pm
by AUGE_OHR
hi,
srvet_claudio wrote: ↑Wed Sep 09, 2020 11:09 pm
I don't remember now the name, but hmg has a function to get the os version. Search in the c source files for "osversion" or "version"
THX, have found
HMG_IsWinVistaOrLater()
HB_FUNC( WINVERSION )
HB_FUNC( WINMAJORVERSIONNUMBER )
HB_FUNC( WINMINORVERSIONNUMBER )
now i use these define in EJECTDLL.CH
Code: Select all
#define VERSION_XP 5.0
#define VERSION_VISTA 6.0
#define VERSION_WIN7 6.01
#define VERSION_WIN8 6.02
#define VERSION_WIN81 6.03
#define VERSION_WIN10 10.0
#define VERSION_WIN10OLD 6.04
so i have to figure out how to re-write my Xbase++ Code.