Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / fixed GET FTP DIR$() - DBProFTPDebug.dll

Author
Message
Bored of the Rings
User Banned
Posted: 24th Mar 2022 06:17 Edited at: 16th May 2022 06:51
[update 27Mar2022 - attached updated FTP dll - just backup your old one and copy/paste in compiler / plugins ]
This is also on the snippets board but thought I should put it here just in case it goes into a void.

So, I updated the github source code to fix the GET FTP DIR$() command that returns a blank. this is because the code does nothing in function FTP_GetDir just returns a FALSE value. not very useful.
Anyway I added code that calls the wininet.dll function FtpGetCurrentDirectory and works perfectly.

so attached is the updated dll if anyone is interested. also I attach a code snippet for you to try out using an anonymous FTP site. backup your original dll, even though there are no crashes or issues that I have found.




I've also added as an extra an updated memblocks dll that allows up to 10000 memblocks instead of the 255 limit. this will depend on how much memory your PC/laptop has so use wisely. I filled all 10000 memblocks but kept the memory used for each one quite small. have a play , and any feedback welcome.

[update - added new version of the FTP dll - better cleanup code]
Pro Programmer / Data Scientist, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others

Attachments

Login to view attachments
Bored of the Rings
User Banned
Posted: 25th Mar 2022 10:01
adding commands to return date stamps i.e. create, access and modification datetime stamps.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Bored of the Rings
User Banned
Posted: 27th Mar 2022 06:52 Edited at: 27th Mar 2022 06:58
the FTP datetime stamp commands are now in and working. I'm keeping the format the same as Matrix1Utils (IanM) for consistency. as my website files are unix based, there won't be any valid creation/access datetime stamps as unix doesn't keep track of them so only modification timestamps will show:

The commands are:

GET FTP FILE CREATETS$();
GET FTP FILE ACCESSTS$();
GET FTP FILE MODTS$()



Looking into other commands and updates/fixes etc. Not necessarily FTP related. will attach the updated dll to 1st post shortly.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Bored of the Rings
User Banned
Posted: 27th Mar 2022 07:16 Edited at: 27th Mar 2022 07:21
updated FTP dll now added to 1st post. comments welcome

I'll add keywords.ini / help file at some point although the commands are self explanatory.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Bored of the Rings
User Banned
Posted: 29th Mar 2022 06:40
added new version of the FTP dll, which uses better cleanup of memory.

more commands to come for various legacy dbpro dlls.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Bored of the Rings
User Banned
Posted: 29th Mar 2022 07:17
now added updated help files and editor keywords to 1st post. the ftp zip should be extracted to your help/commands/ folder and the keywords to your editor/keywords folder.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Bored of the Rings
User Banned
Posted: 30th Mar 2022 13:11 Edited at: 30th Mar 2022 20:27
looking to add following command, plus others at later date e.g. datetime stamp output formats, ftp file manipulation e.g. renaming etc (I don't think is possible with legacy DBPro FTPdll):

SET/GET FTP TRANSFER MODE - currently the source code automatically sets to binary, but some users might want ASCII mode 0x00000001 (binary mode = 0x00000002).
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Bored of the Rings
User Banned
Posted: 31st Mar 2022 10:24 Edited at: 31st Mar 2022 11:01
Set FTP Transfer Mode / Get FTP Transfer Mode commands added, testing and will upload new dll at some point.

[edit] - actually as the commands in the help files are FTP SET ... / FTP GET ... , I will update NEW ftp commands to mirror legacy names.
[edit2] - ok, I have updated all DBPro legacy FTP commands to be consistent i.e. FTP GET / FTP SET instead of GET FTP ...

I will update the keywords / helps files again.. usually I would do this last but I want to keep track of everything as I go along for now.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Bored of the Rings
User Banned
Posted: 1st Apr 2022 06:06
FTP SET / GET TRANSFER MODE commands now work in ascii and binary mode, tested using my website / ftp site. so happy so far. need to add these to the AppGameKit dll commandset which has around 590 odd commands so far. where does the time go?

updating keywords.ini / help files as I go along. will post all updates as soon as possible.

adding file manipulation commands, ftp rename file, ftp delete file, ftp create file etc and any thing else I can think of that's missing
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Bored of the Rings
User Banned
Posted: 1st Apr 2022 09:42
updated ftp package uploaded to 1st post in zip file.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Bored of the Rings
User Banned
Posted: 1st Apr 2022 15:05
Just to mention that the transfer mode defaults to Binary mode even if you don't use the FTP SET TRANSFER MODE (1=ASCII, 2=BINARY) command. It really is only there if you really need to use ASCII mode.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Bored of the Rings
User Banned
Posted: 7th Apr 2022 05:31
the new FTP commands have now been ported over to DarkGDK. The update includes/lib etc will be uploaded at some point, doing some testing (as usual).
Pro Programmer / Data Scientist, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Wizard007
9
Years of Service
User Offline
Joined: 21st Oct 2015
Location: Lisbon
Posted: 15th Apr 2022 00:44
At the moment I'm not using the FTP command, but I have tried the HTTP REQUEST DATA on the original dll and seems broken sometimes and have been reported broken here in this forum. Don't know if in this dll got fixed, if not and if is possible will be good to get fixed
Bored of the Rings
User Banned
Posted: 15th Apr 2022 12:16
Thanks for reporting I'll take a look and fix it
Pro Programmer / Data Scientist, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Bored of the Rings
User Banned
Posted: 16th Apr 2022 10:29 Edited at: 17th Apr 2022 20:16
@Wizard007:

Any code you have tried to use for this command that I can have a look at and see why it's not working?
Pro Programmer / Data Scientist, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Wizard007
9
Years of Service
User Offline
Joined: 21st Oct 2015
Location: Lisbon
Posted: 17th Apr 2022 19:16
I don't have any code at the moment, but from what I remember from previously testing the command, it only get a part of the response of the http request, especial when it is a bit big.

Login to post a reply

Server time is: 2024-11-17 22:15:16
Your offset time is: 2024-11-17 22:15:16