Jump to content

Mark Williams

Members
  • Content Count

    142
  • Joined

  • Last visited

Community Reputation

9 Neutral

Technical Information

  • Delphi-Version
    Delphi 10.3 Rio

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Mark Williams

    TEncryptedZipFile

    @Uwe Raabe I have just had a look at this component on your blog. I could get it to write an encrypted zip file, which I can open manually no problem, but I cannot get it to decrypt using the component. I downloaded the amended unit from https://www.uweraabe.de/Blog/2017/05/07/tzipfile-with-password-encryption-part-3/, but this still didn't work for me. My code for unzipping is as follows: Zipper:=TEncryptedZipFile.Create('Mark'); Stream:=TMemoryStream.create; try DecompressionStream:=TStream.Create; Zipper.Open(OpenDialog1.filename, zmReadWrite); Zipper.Read('File', DecompressionStream, zh); Stream.CopyFrom(DecompressionStream, DecompressionStream.size); {Crashes here} DecompressionStream.Free; Stream.Position:=0; Stream.SaveToFile(ExtractFilePath(includeTrailingPathDelimiter(openDialog1.FileName))+'File.docx'); Zipper.Close; finally zipper.Free; stream.Free; end; I have used the same routine as I would for reading from the standard TZipFile ie using the DecompressionStream. Can't work out whether my approach is write or if there is a problem with the TEncryptedZipFile code. Anyways my debug output is: System.Classes TStream.ReadBuffer System.Classes 8340 +1 TStream.ReadBuffer uEncryptedZipFile 299 +9 TDecryptStream.Skip uEncryptedZipFile 277 +10 TDecryptStream.Seek System.Classes 7561 +1 TStream.SetPosition System.ZLib 2891 +32 TZDecompressionStream.Read System.ZLib 2939 +27 TZDecompressionStream.Seek System.Classes 7569 +2 TStream.GetSize
  2. Mark Williams

    FTP add virtual directory

    @Remy LebeauThanks for the detailed response. Are there any problems running an Indy FTP server alongside IIS? Also, do you know of any good sample FTP server projects anywhere?
  3. Mark Williams

    FTP add virtual directory

    Is it not possible to also password protect the folder? My intention is to maintain a record of the virtual folders in a database and require the user to signal continued use of the folder and as soon as there is a failure to do so the folder would be deleted. Is this the Overbyte stuff? I will have a look. So if I wanted to run IIS and ICS on the same server I would need a second static ip?
  4. Mark Williams

    FTP add virtual directory

    Thanks. I'll have a look at WMI. Which type library do you use? I've got a couple on my registered libraries.
  5. Mark Williams

    FTP add virtual directory

    Yes it's pretty easy to set up via IIS, but the security angle is precisely why I don't wish to do it this way. I want to check the user's credentials against database and then issue that user a one-off password for a single transaction and add a temporary ftp folder, which then gets removed as soon as the user has completed the transaction. There may be better ways of doing this. As I said I'm a FTP novice!
  6. Mark Williams

    FTP add virtual directory

    Using IIS. New to FTP. Can anyone please give me a steer as to how to programmatically add and configure virtual FTP directories in IIS via Delphi?
  7. Mark Williams

    ISAPI DLL MaxConnections

    Thanks. I'll look into this at some point. However, my ISAPI dll isn't really designed to do heavy lifting. Just user validation, configuration settings and downloading of smallish files. There is occasionally a need to upload/download largish files and this is something I am planning to move to FTP or maybe there is a better/faster solution?
  8. Mark Williams

    Detect user location from ip address

    Must be a European thing. As of last Friday it is now unlawful for me to get such jokes!
  9. Mark Williams

    Detect user location from ip address

    I'm not sure what you're referring to. Can't see anything on the page/website which helps.
  10. Mark Williams

    Detect user location from ip address

    I found an example of how to do it (although not tried it) here: https://www.example-code.com/delphiDll/geolocation_ip_address.asp
  11. I wouldn't have thought it was possible to do this, but when my kids sign in to my Netflix account from various locations I get an email from Netflix to let me know what country and region they have signed in from. Does anyone have any idea how Netflix gets this info?
  12. Mark Williams

    ISAPI DLL MaxConnections

    I'll give that a try and see how it pans out. I thought this was more or less what iis does with the dll.
  13. Ok. Thanks. I'll have a look at that and report back if I can improve on what I have already got.
  14. Scanlines is fast enough for my purposes even when it scans every pixel. I would be reluctant to rely on random sampling.
  15. Thanks. I've sort of come up with something along those lines using Scanlines. It seems to be tolerably effective and sufficiently fast.
×