Jump to content

FPiette

Members
  • Content Count

    1200
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by FPiette

  1. Are you sure you test all possible error everywhere and don't ignore any exception? The code you gave yesterday is flawed. Your addition in RequestDone handler to start a new mail do not depend on the RqType but is always executed.
  2. FPiette

    Is interposer class really best to customize TPanel.Paint?

    I never use IDE global path, nor library folder. All my project have explicit paths (always relative) to everything, except components delivered with Delphi. All my components and all 3rd party components I use are all explicitly added to all projects they are used in. And I always recompile everything, never use a prebuilt dcu, obj or package. This way I'm always sure to have everything required to build an application. On the computer I use, it takes only a few seconds to compile hundreds of thousands code line. I use Delphi since version 1 (25 years ago) for almost full time. I wrote hundreds of applications, some of which are very large. I have always had great success. I will not change the way I work.
  3. FPiette

    Is interposer class really best to customize TPanel.Paint?

    What do you mean? No, the same .groupproj file is usable with any IDE. And the dpk file are compatible between IDE version as well. I works really nicely and easily. You should try... Yes, indeed. I frequently use a project group with more than 100 projects.
  4. FPiette

    Is interposer class really best to customize TPanel.Paint?

    I don't think so. I made a lot of components, split into a number of packages. I have a project group with all packages. I do a "right click" / "From here" / "build all" in the project manager and then select all design time packages in project manager and right click and select "install". It takes at most 2 minutes for everything. I don't call that a pain. And you only do it once when a new IDE is here. I also use 3rd party components and I add their packages in the same project group as my own components for easy installation in any new IDE. This is quick and easy. With a component installed in the IDE, you don't even have a single unit to include. The IDE do it for you when you drop the component on the form. Much easier and cleaner than an interposer class IMO. No code to add manually to any of your application.
  5. This is because the component is asynchronous: start some operation which is executed in the background while you own code continue. When operation is finished in the background, you receive an event. Your program should use the async way of programming. That is no loop but events and messages. Code outline: 1) procedure to do your SQL request then PostMessage a custom message 2) from the handler of this custom message, take current record and start sending a mail. If EOF then you are done. 3) handle all SMTP component events, chaining commands for OnRequestDone until the mail is fully sent 4) when mail fully sent, use PostMessage to post the custom message. Those 4 step are NOT in line in a single procedure ! They are "chained" thru events or custom message, just like "All-in-one" button does
  6. FPiette

    Is interposer class really best to customize TPanel.Paint?

    I really don't agree with this sentence! Creating a separate package helps having clean code which is reused easily. Registration is just one procedure call in the design time package. You write it one and forget it. You don't replace an existing panel: you use your specialized one when needed instead of the standard. You have both the standard panel and your specialized available in the component toolbar. You can even use both in the same form without worrying. There is no bundling with app required. Simply don't add that package in the run time package list. The component code will automatically bundled in the application. Nothing to deploy. Building component is the best solution. You do it once and them you use it. If you have an existing application and want to use your specialized panel, it is easy to edit the .dfm and .pas files using an external editor (NotePad or NotePad++) to do a simple search and replace to change TPanel by TMyPanel where is is needed. It is always easier to do that edit than opening the form, deleting the standard panel, dropping the specialized panel and reassigning properties and events!
  7. FPiette

    Is interposer class really best to customize TPanel.Paint?

    Instead of an interposer class, I would simply create a new component inheriting from TPanel. The component code is what @DaveNottage shown except for the class name. Then this component is added to a package (Actually two: a run time and a design time package) so that it can be installed in the IDE and available where you need: you drop your specialized component on the form/frame instead of the standard panel. If you don't know how to create your component, there are a lot of tutorials on the Internet showing how to create your own TMyButton. It's the same process with a panel Google is your friend.
  8. Be aware that running an executable is a slow process. If you put the same code in a DLL, this can stay loaded as long as you decide to. You may unload the DLL for example when the last request occured 5 minutes ago. If you prefer the EXE, then you may manage to let it run as long as you need, avoiding a new start for each request. The only difference is that you'll pass the arguments not thru the command line but thru some IPC (named pipe is quite fast). And why not a secondary HTTP server?
  9. First remove any display and logging. This slow down considerably the server. Use display (Progress and so on) and logging for debugging purpose or apply a strategy more complex that what is in the demo.
  10. This is not very clear to me. Are the users HTTP clients connected to the HTTP server? Are those client local or remote? Your "app" look like a standard console mode executable. Your service can call it calling CreateProcess but be aware that a service run with a special account, even when no user is logged in Windows and certainly not the user that has logged in Windows. The account for the service has different permissions from the logged in user. You must grant all required permissions and it is not easy to "impersonate" the user that a HTTP client is representing.
  11. FPiette

    What options do I have to control custom releases?

    I put all options into a single executable and at run time, I read a configuration file to set the features enable Boolean variables. The configuration file is an INI file which is protected by a digital signature the customer receive with his license. If he manually edit the INI file, then the signature is invalidated and the product fall back to demo mode. Using this method, there is only one executable and producing a new release is easy: every customer get the features his license allow, nothing more, nothing less. Each customer can download the executable to get an update. Since you use Delphi, you already know that Embarcadero is doing the same: The installer contains all versions, all languages. You get the pro version if you pais a pro license. You get the enterprise version if you paid for it. As easy as that.
  12. I'm a long time developer of open source components and I know this problem very well. The idea is not to ask the component developer to implement something you'd like but ask very simple thing like making a method virtual or change a method visibility from private to protected. Then you'll be able to implement yourself what you need in a derived class. Asking for such simple things which present almost no risk to break something is likely to succeed. But asking the component developer to implement something for you will probably be rejected. You'd better chances to implement it yourself and suggest your changes.
  13. I don't usually modify 3rd party source code. Sometimes, I inherit from the 3rd party, adding my code only in separate source. If what I need cannot be done with inheritance en encapsulation, if I still find the 3rd party code valuable, I contact the author asking him to make some methods virtual or expose new properties. If he doesn't want, then I don not use his code because - as you experience - it will be a lot of work in the future.
  14. This is the command line OpenSSL tool. That is not what you need at this stage. You need the OpenSSL DLL. The name of the DLL depends on the version. For OpenSSL 1.1, there are two DLLs: libssl-1_1.dll and libcrypto-1_1.dll. They are in the same directory as the OpenSSL.exe that you found. If not, your ICS setup is corrupted.
  15. FPiette

    ICS v8.64 can't compile on Delphi 7

    Remove inline everywhere you see it.
  16. FTP use two connections. One for commands and one for data. FTP OnRequestDone event is triggered for every command once executed. Did you had a look at the source code ? OnRequestDone event has an argument RqTyp of type TFtpRequest which is an enumeration of all 78 FTP commands. When in the IDE, use CTRL+Click to immediately jump to any identifier definition.
  17. FPiette

    THWClient.RequestDone

    List of HTTP status code.
  18. There is no such thing as "full help". The documentation is in the source code (Component and samples) and on http://wiki.overbyte.be The wiki can be updated by anyone willing to share his knowledge. Just ask write permission.
  19. HTTP component is asynchronous, it doesn't need a thread to be non blocking. It will consume very few CPU. As I see your application, you don't need multithreading at all. A thread would be necessary if - for example - you have a lengthy computation.
  20. FPiette

    DebugLog

    If the problem is reproducible, try running the application under the debugger. If it only happens on the customer computer, ask him if you can use Delphi Remote Debugger thru Internet. The debugger will readily show where the exception occurs. And by the way, try downloading the same file using one of ICS demos to be sure the issue is located in ICS or in your application. François
  21. It is likely an issue of a security product. Maybe a firewall or an "internet security" product which monitor outgoing connections. You must enable connections done by your application into those products.
  22. The download should always be done from http://wiki.overbyte.eu/wiki/index.php/ICS_Download which is more up to date. Currently, V8.64 is the latest stable version recommended.
  23. I don't see anything wrong in line 277. Strangely both files have an error at the same line, same column. Download ICS again and retry.
  24. FPiette

    TSslSmtpCli in Console App

    Angus, this model is not suitable for CGI. A CGI module is expected to run as quickly as possible. If a queue and retries have to be done, it must be launched independently by the CGI so that it becomes an independent process. Or the CGI could call a service doing the actual send. Or other similar solutions.
×