Jump to content

FPiette

Members
  • Content Count

    1167
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by FPiette

  1. I think you are using a quite old ICS version because currently, all ICS as well as Midware files have their name prefixed by Overbyte. Be sure to install latest ICS first. And make sure old ICS is not available anymore (It can stay on disk but shall not be found using search path of any kind). You have to install ICS as explained in ICS documentation. Do not copy ICS files from ICS folder to Midware folder. Instead add to your Delphi global search path the source folder of ICS as well as the source\include. Only then you can build Midware. I'm not sure but you should probably also modify OverbyteIcsDefs.inc to make sure USE_SSL is not defined when building Midware which do not require SSL. I mean I'm not sure ICS distribution has USE_SSL symbol defined or not.
  2. FPiette

    Hang problem

    You should also monitor the session closed event. If your client stop reading data without disconnecting, the timeout can be very long. I suggest you simply abort (Not close) the connection for that client.
  3. FPiette

    ICS registration

    SSL is included in the standard ICS distribution completely free of charge as the whole ICS. The fee date back a long time, when there was a kind of sponsoring of ICS users needing SSL support. They had the product before it became free. As I said, now there is only a single ICS which include SSL support.
  4. You are right. I updated the zip file. Please download again and let me know if it works now. Thanks.
  5. FPiette

    Hang problem

    You can put data into the sendbuffer (That is call one of the send method). In OnDataSend event Handler, you set a flag to true and you reset it when you call send. Initialize the flag to true when the connection is established. Before calling one of the send methods, check the flag. The question is what will you do when the client doesn't receive fast enough ? Just throw away the data ? If you buffer it, then you'll have again a problem of too much data eating all available memory.
  6. See the announce message there: https://en.delphipraxis.net/topic/969-midware-new-update-available-for-latest-delphi-and-ics/
  7. Hello Midware fan, I have updated Midware for the latest Delphi 10.3.1 Rio compiler and for the latest ICS version. You can download from http://www.overbyte.eu/eng/products/midware You can find documentation at http://wiki.overbyte.eu/wiki/index.php/midware If you have any question, please start a new topic and be sure to add "[Midware]" in front of the title line. Have a nice day coding with Delphi
  8. FPiette

    Remote Desktop with ICS

    I understood that your first test which succeeded was using a set of computers and a given network and that the second test use a different network - a company network- and probably other computers. IMO, with the second test, you have something blocking in the network managed by the company. The routs between the two computers may be complex inside a company, with routers, bridges, WAN, firewall and more. I suggest you get a simple Ethernet switch and connect the two computers under test directly on that switch or directly connect the two computers at each end of a single cable (a cross cable if the Ethernet cards are not able to sense I/O). Then verify that the software works as expected. If this succeed, it means everything is OK with the two computers and the software. Be sure that the two computers have their IP address in the same range (Use IPConfig to check that). Then connect the two computers on the company network and test if the software still work. If it doesn't then something in the company network is blocking the traffic you want to create (This is frequent in a company network where security is a concern). If it doesn't work, ask the system administrator. Note that the problem is even more complex if the two computers are separated by a router. All those problems are NOT related to ICS. They are just normal behaviour of a LAN/WAN based on IP protocol family.
  9. FPiette

    TSslHttpCli

    Thanks for feedback;
  10. FPiette

    Remote Desktop with ICS

    Check the firewall rules on each local computer, and check the firewall in the company infrastructure. Ask the system administrator to open the port you are using and to allow the application and routing of the traffic.
  11. Delphi 7 is too old. Using the current version available from my website. The new - unpublished yet - version is for recent Delphi compiler. Or upgrade your Delphi to the latest version (Delphi 10.3.1 Rio) you'll have tremendous enhancements compared to Delphi 7.
  12. FPiette

    TSslHttpCli

    You should run your application under the debugger which will show where the exception occurs. This is what is needed to understand what happen.
  13. FPiette

    TCP Receiving Binary File

    I have fixed the demo to work with all Unicode enabled Delphi versions (2009 and up). It will no more work with older ascii only versions. I have tested with Delphi 10.3.1 rio. The file sendfile.zip has been updated on the website, you can download again from usermade page at http://www.overbyte.be Let me know if it works for you.
  14. FPiette

    TCP Receiving Binary File

    The problem with this demo is a Unicode issue. The author made it with a Delphi version before Unicode was introduced. This demo assume a char in an AnsiChar (8 bits) while for years char are Unicode (16 bits). This is not difficult to fix. The buffer used to send/receive binary data must by an array of byte instead of an array of char. For the filename, you have to choose if you want to send Unicode filename or ASCII filename and convert appropriately. Do you need more help to fix the sample? François Piette ICS Authour Embarcadero MVP
  15. FPiette

    TSslHttpCli

    You can find it on the download page at the wiki: http://wiki.overbyte.eu/wiki/index.php/ICS_Download#Version_Control_System François Piette Embarcadero MVP
  16. I have Midware updated for latest Delphi 10.3.1 Rio. Not tested with previous releases but should work as not much code has been changed. If people are interested I could create a new distribution. François Piette Embarcadero MVP
  17. Sorry to hear that. I tried right now and it works perfectly. According to the message you get, this message comes from your "Web Anti-Virus". I don't know this product but for sure it is the culprit. I suggest you disable it. Also note that the source code is attached to my first message in this thread.
  18. It is already available in my blog for years: http://francois-piette.blogspot.com/2013/04/inter-process-communication-using-pipes.html
  19. I have done an intensive debug session and found the issue although I don't understand why it works with older Delphi versions. At line 2710, where the server hang, we have the code: Result := GetOverlappedResult(FPipe, FOlapRead, FRcvRead, TRUE); I simply changed the last argument by FALSE like this: Result := GetOverlappedResult(FPipe, FOlapRead, FRcvRead, FALSE); And now it works! That last argument when TRUE tells GetOverlappedResult to wait until completion. If FALSE, it returns immediately with whatever data is available, setting FRcvRead variable with actual number of bytes read. Since we only go to that code line when data is available, because of WaitForMultipleObjects called at line 2939, we can safely don't wait for more data. I will do more testing with the actual - real world - application using that code. In case the issue persist, I will report it here. Thanks to all having participated in this conversation. -- François Piette Embarcadero MVP
  20. Hi Allen, Thanks a lot for having taken time to look for my issue. I gave a try to your solution and unfortunately it doesn't work here. I wonder why, if it is a Windows update issue, the application compiled with an older Delphi is working!? I have read the KB2918614 update description designated as the culprit by the article you mention. I don't see anything related to the present issue. I fear about broking something elsewhere if a rename the folder as described. Best regards, François Piette
  21. FPiette

    Remote Desktop with ICS

    The main difference between the TCP/IP component you currently use and ICS is that ICS if fully asynchronous and event driven while the one you use is blocking. Using ICS, each method you call is merely a request to do the operation. You get back control almost immediately while the operation you requested (connect, send,...) is occurring in the background automatically. When it is done, you get an event (OnSessionConnected, OnDataSent, OnDataAvailable and others...). There are a lot of simple samples delivered with ICS. Have a look at some of them. For example OverbyteIcsTWSChat.dpr which is both a client and a server. François Piette Embarcadero MVP
  22. OK, Sherlock and Alexander confirm it doesn't work. Sorry for the other, but I fear they confused being able to compile (That works everywhere) and correct execution (Message sent from client is visible on server). Now the real question: what has changed in Delphi that make it fail now while it worked for year, until Delphi 10.1 in fact. I think it ois a threading issue but not sure. I tried to debug the code but was not able to see anything obviously wrong (And it isn't since it worked up to Delphi 10.1 so it is clearly soothing related to Delphi itself). Any help to find out the issue is really appreciated. Regards, François Piette Embarcadero MVP
  23. Thanks for all having tested. It definitely doesn't work here. Just to be sure: it compile fine but at runtime, the server hang on receiving message. So are you sure you tested at runtime and successfully sent a message (In the edit box) from client to server? (Instruction in my first message above). My tests are done on Windows 7 up-to-date. Thanks.
  24. I confirm it work on 10.1 Berlin 32 bit. I confirm it doesn't work on Rio 10.3 Update 1 (Version 26.0.33219.4899). That is what is required for me. I was testing previous versions in the hope to find out what was broken at some point. Best Regards, François PIETTE Embarcadero MVP
  25. Someone willing to stay anonymous send me this information: Installation v8: Download and extract ICS package Exit BCB rename/delete \bpl\Overbyte*.* Compare and copy over: OverbyteICSJwaWinCrypt.inc {$HPPEMIT trailing semi-colon OverbyteICSCB2007Run/Design.cbproj pathing 1. Paths and Defines|Final Output says your bpl directory 2. Paths and Defines|BPI/Lib Output says bpl directory OverbyteICSCB2007Run/Design extra pragma links 1. #pragma link "crypt32.lib" 2. #pragma link "cryptui.lib" Source\OverbyteIcsSslSessionCache.pas 1. Comment out DateUtils (as breaks pch) 2. replace IncSecond function with t1 := ((t2 * SecsPerDay) + SessionTimeOut) / SecsPerDay; Source\OverbyteIcsCryptUiApi.pas comment out hppemit OverbyteIcscryptuiapi.h Copy source\zobj125 *.obj to source folder Start BCB Say yes to module load again message - if you say No then must use Regedit to remove the disabled package (Computer\HKEY_CURRENT_USER\Software\Borland\BDS\5.0\Disabled Packages) Open \ics\Install\CB2007Install.groupproj Select and Build the run-time package in RELEASE mode (do not install). Select and Install the design-time package. Then do a "Save All" and a "Close All". Restart BCB Create cmp/ics/headers copy all C:\dev\cmp\ics\Lib\Debug\Win32\D2007\Overbyte*.hpp to that folder Diff with previous headers and comment out bits and bobs comment out all typedefs in OverbyteICSCryptUiApi.hpp Headers\OverbyteIcsHttpAppServer.hpp 1. AddGetHandler use EmptyStr instead of "" 2. AddGetHandler use EmptyStr instead of "" 3. AddGetAllowedPath use EmptyStr instead of "" 4. AddPostHandler use EmptyStr instead of "" 5. AddPostHandler use EmptyStr instead of "" 6. comment out IcsLoadTHttpAppSrvFromIni Headers\OverbyteIcsHttpSrv.hpp MakeCookie use EmptyStr Headers\OverbyteIcsSslHttpRest.hpp 1. RestRequest use EmptyStr 2. GrantAuthToken use EmptyStr Headers\OverbyteIcsSslSessionCache.hpp ensure your DateUtils include Headers\OverbyteIcsSslX509Certs.hpp 1. AddItem use EmptyStr 2. DumpJson use EmptyStr 3. CCGetRequest use EmptyStr Headers\OverbyteIcsSslX509Utils.hpp 1. WriteReqToBio EmptyStr 2. SaveToCADatabase EmptyStr OverbyteIcsSslX509Utils.hpp WriteReqToBio use EmptyStr headers\OverbyteIcsSuperObject.hpp 1. comment out virtual _di_ISuperObject __fastcall GetN 2. comment out _di_ISuperObject NWideString path 3. virtual bool __fastcall Validate remove L"" 4. comment out ParseString 5. comment out ParseStream 6. comment out ParseFile 7. comment out ParseEx 8. bool __fastcall Validate( remove L"" 9. _di_ISuperObject __fastcall SO( remove L"" headers\OverbyteIcsWinCrypt 1. comment out typedef _VTableProvStruc *PVTableProvStruc; 2. comment out typedef _VTableProvStruc TVTableProvStruc; add to Tools->Options->Environment Options->C+ Options->Paths & Dirs: Paths \ics\headers Load a project any In project options->Packages check the design packages are referenced from \bpl Check design TMS softwares packages are enabled (bizarrely this sometimes get unchecked ) Save all, close all, restart Distribute cmp directory to other dev(s)
×