AllanF
Members-
Content Count
34 -
Joined
-
Last visited
Community Reputation
0 NeutralRecent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Is Delphi Alexandria compatible with MacAirbook M1 Chip, macOS 10.14 Mojave
AllanF replied to AllanF's topic in Cross-platform
Thanks for the response! I'll be running Delphi on my existing Windows machine, and I’ll have a MacBook Air within the LAN, so I don’t expect it to require many additional resources. The product description on Amazon.in states: "Apple MacBook Air Laptop: Apple M1 chip, 13.3-inch/33.74 cm Retina Display, 8GB RAM, 256GB SSD Storage, Backlit Keyboard, FaceTime HD Camera, Touch ID. Works with iPhone/iPad; Space Grey." -
Is Delphi Alexandria compatible with MacAirbook M1 Chip, macOS 10.14 Mojave
AllanF posted a topic in Cross-platform
I am a Delphi developer and am using Delphi Alexandria. I want to create few MAC FMX applications. I have tried MacInCloud but it is too slow. I want to purchase a MAC instead which is affordable. I have found MacAirbook M1 Chip, macOS 10.14 Mojave within my budget. My worry is that the Mac should not be too old and incompatible with Delphi Alexandria -
Can I respond to a REST Request from TSslWSocketServer
AllanF replied to AllanF's topic in ICS - Internet Component Suite
It is working. Thank You. -
Can I respond to a REST Request from TSslWSocketServer
AllanF replied to AllanF's topic in ICS - Internet Component Suite
Hi Angus, My REST Client request is Secured TLS. Also (Sender as TClientConnection).SendStr('Hi') wherein Type TClientConnection = class(TSSLWSocketClient) It is essential that I use Secured Layer only. -
Can I respond to a REST Request from TSslWSocketServer
AllanF posted a topic in ICS - Internet Component Suite
I already have a TSslWSocketServer listening on port NNNN and successfully accepts TSSLWSocket client connections. All this happens within the context of my Delphi Applications. Now I need to provide an API in my application. I want to use the existing TSslWSocketServer to listen to any REST calls also. REST call comes in successfully and I can read the content in DataAvailable Event too. My problem is that I cannot send back any message to the REST Client. I am using (Sender as TClientConnection).SendStr('Hi') but it does not reach the REST Client. I know this is not the appropriate way but I just need to send some indication that message has been received. -
64 Bit TSslFtpServer not Renaming a File
AllanF replied to AllanF's topic in ICS - Internet Component Suite
I did changes as you mentioned and it is working now. Thank You. unit OverbyteIcsFtpSrv; ... ... function DirExists(const Dir : String) : Boolean; { V1.52 AG} { INVALID_HANDLE_VALUE = INVALID_FILE_ATTRIBUTES = DWORD(-1) } {$IFDEF MSWINDOWS} var Res : DWORD; begin Result := {$IFDEF RTL_NAMESPACES}System.{$ENDIF}SysUtils.DirectoryExists(UnicodeString(Dir)); exit ; // Res := GetFileAttributes(PChar(Dir)); // Result := (Res <> INVALID_HANDLE_VALUE) and // ((Res and FILE_ATTRIBUTE_DIRECTORY) <> 0); end; {$ENDIF} {$IFDEF POSIX} begin Result := System.SysUtils.DirectoryExists(Dir); { V8.50 } end; {$ENDIF} -
64 Bit TSslFtpServer not Renaming a File
AllanF replied to AllanF's topic in ICS - Internet Component Suite
The function returns True even though pointing to a files that does not exist function DirExists(const Dir : String) : Boolean; // Dir = 'c:\23000\Pqr.txt' var Res : DWORD; begin Res := GetFileAttributes(PChar(Dir)); // Res = 4294967295 Result := (Res <> INVALID_HANDLE_VALUE) and ((Res and FILE_ATTRIBUTE_DIRECTORY) <> 0); // Res and FILE_ATTRIBUTE_DIRECTORY = 16 // (Res <> INVALID_HANDLE_VALUE) and ((Res and FILE_ATTRIBUTE_DIRECTORY) <> 0) // Though having the same value this line return True in 64Bitness and False in 32Bitness end; procedure TFtpServer.CommandRNTO( ... if FileExists(FileName) or DirExists(Filename) then Answer = '553 ''/c:/23000/Pqr.txt'': file already exists.' -
On Server Side I have been successfully using TSslFtpServer (Delphi Seattle) with IcsHosts for SSL From Client Side I PUT a File , Check Size after Copy & Finally Rename the File. All this has worked fine for years. My Server Side Exe was 32 Bit. Now I want to make it 64Bit Exe. From Client side Copy takes place , Size checking takes place but Rename does not happen. I get the error 450 File '/c:/Sample/Abc.txt' can't be renamed 64 Bit works fine without SSL
-
Cannot Transfer Higher values like Chr(65470)
AllanF replied to AllanF's topic in ICS - Internet Component Suite
Since my application is already in use at few customer's installations and is running smoothly, I did not have the courage to make major changes. It is actually the user passwords that I is saved in my databases with some basic encryption that were giving this problem. Putting both your valuable advice together I did make a routine that goes thru the String prior to the Send operation, character by character and recognizes Ord(...) > 65375. I am now converting that Password into Simple text and upon reaching destination reversing it again. Since my String's are made of a Tagged parts it is simple to extract the problem areas. Thank You for the support. -
Cannot Transfer Higher values like Chr(65470)
AllanF replied to AllanF's topic in ICS - Internet Component Suite
In this way I can't seem to capture from the Client side using below method. Will the Client side code be different too ? FRcvdLine := TSSLWSocket(Sender).ReceiveStr ; -
Cannot Transfer Higher values like Chr(65470)
AllanF posted a topic in ICS - Internet Component Suite
Hi, I am using ICS Components with Delphi Seattle to send text between Server to Client and vice versa. But when using higher values like Chr(65470) the transfer does not happen correctly. Server Side: TSslWSocketServer Client : TClientConnection; Client.SendText('Hi '+Chr(65445)+Chr(65470)+#13#10); Client Side: TSSLWSocket procedure Tform_ClientSocket.SockClient_SsrvClientDataAvailable(Sender: TObject; ErrCode: Word); var FRcvdLine:WideString ; // AnsiString does not work either begin FRcvdLine := TSSLWSocket(Sender).ReceiveStrA ; Hi ?? Regards Allan -
Is TSslContext yet required with TSslWSocket (Client side)
AllanF replied to AllanF's topic in ICS - Internet Component Suite
My mistake was that I was sending first message to the Client from within the TSslWSocketServer.DataAvailable event. Took that off and it is now working perfectly. -
Is TSslContext yet required with TSslWSocket (Client side)
AllanF posted a topic in ICS - Internet Component Suite
Hi, I am using TSslWSocket (TSslContext) to connect to TSslWSocketServer (using IcsHosts) Is it possible to avoid TSslContext on Client Side too ? I am asking because the Client side loses out some data initially upon just connecting. Without SSL same code work fine. I tried to prepare a small sample but that works fine with SSL too. I am using Delphi Seattle on Windows 10, Single machine, Two Exe's (Server and Client) for testing Regards Allan -
Hi I am currently using TSslFtpServer and TSslWSocketServer in combination with SslContext but there are connection issues coming up recently with Failed SSL Handshake before negotiation. Instead of chasing that I want to update to the current technique of using ICSHosts. Here I am stuck when trying to connect with FileZilla Client my Server comes into ClientConnect Event and then in ClientCommand Keyword is empty and then control goes to ClientDisconnect. Does not go into Validation etc. The problem is that there is no example using ICSHosts, so I used the OverbyteIcsSslFtpServ example removing the SslContext and adding a Item in IcsHosts Kindly note that mine is an application wherein I have a Server module running on one machine and I have several machines connecting to the Server There is no Website I can validate 'HostNames.Strings' with, so hope machine name will do ? DFM section of TSslFtpServer IcsHosts = < item HostNames.Strings = ('VMAF') HostEnabled = True HostTag = 'MyTag' SslCert = '01cert.pem' SslKey = '01key.pem' SslInter = 'cacert.pem' end> since 01cert.pem etc. are not working here I made fresh Certificates which I tested and are working with the SslContext. Regards Allan
-
In my Service I want to to receive notification when the system is suspended or resumed
AllanF replied to AllanF's topic in Windows API
>> I'll email my unit that does all this. I looked at all the options suggested by Angus and Remy. Then I implemented the emailed Pas files and tested it with all possible options I could manage. Was most simple to include in my program and works perfectly fine. Very grateful to both for pulling me out of this one too.