Jump to content

FPiette

Members
  • Content Count

    1200
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by FPiette

  1. No, it is a forward declaration. The class itself is declared after TDrawingObject. That declaration is enough for the compiler to know it has to reserve space for the class field (Actually a pointer). The code accessing the property DrawingObjectList is in the implementation section and after both classes have been completely defined.
  2. As long as you avoid or detect recursive infinite loops, then it is OK.
  3. FPiette

    ICS Delphi DataSnapBridge

    Maybe this will help:
  4. FPiette

    Waiting for something without blocking the UI

    You could use a non-blocking asynchronous TCP component such as ICS (TWSocket and other for high level protocols). With ICS, methods like Connect, Send, Receive and other are not blocking, they are merely a request which are almost instantaneous. Later when connection is established, data received or sent, you have an event. The UI is never blocked, even with hundreds of active connections. No need to use thread of wait loop (Of course you may use both if you like complexity). You can install ICS from the IDE using GetIT, or download a zip file, or use the SVN repository. Have a look at http://wiki.overbyte.eu/wiki/index.php/ICS_Download. Dephi-Praxis has an ICS dedicated support forum : https://en.delphipraxis.net/forum/37-ics-internet-component-suite/
  5. FPiette

    Class with own Thread

    You don't need to put the whole class in a thread. Just put the blocking call in the thread. Or use a non-blocking component to do the REST communication, such as ICS.
  6. I'm using 3-5 hardware components Maybe you mean that you use 3 to 5 devices in the computer to generate the fingerprint. If this is the case, then don't forget that the use may upgrade their hardware because of failure or just better performances. You may detect an unknown computer just because they replaced their Ethernet card (If you use the MAC address), hard disk serial or even Windows own MachineGUID. The computer may also be a virtual one running under VMWare, Hyper-V or another hypervisor. That the hardware is virtualized. Lot's of traps...
  7. This could help: https://social.msdn.microsoft.com/Forums/windowsdesktop/es-ES/fbe70102-526c-4beb-9929-6da9131797a8/device-identification-values?forum=netfxbcl
  8. I'm aware that the documentation specifies that nodes with attachments must be document/pdf in binary format. Would you reproduce that part of the documentation here? I ask because what you tell is largely incomplete and confusing. If you show us a complete XML document with a PDF file attached, that could help. Someone could be able to recognize the encoding format. Maybe me.
  9. I'm probably stupid, but you still don't clearly tell if you write the server side. If you write the server side and the client side, you can define things like you prefer. For example encoding the PDF file as a base64 stream which is just text and put it in the XML document. If you don't write the server side, then contact the author of the server to get the requirements he selected.
  10. You have not answered the question I asked: Are you writing both ends of the document exchange system? Look at: https://www.rfc-editor.org/rfc/rfc3778.txt
  11. Are you writing both ends of the document exchange system? If you must access an existing system, then you must get the specification of the attachment.
  12. This file is normally in Midware base directory. Attached to this message. OverbyteSObjThrd.pas
  13. Please avoid asking any question not directly related to ICS in this ICS dedicated forum. Indy has his own support channels.
  14. I had an application (A UI in front of an image SQLite database) using Direct2D 1.0 thru Delphi provided TDirect2DCanvas (VCL). This work well and it is fast. To be able to use recent features of Direct2D, I wrote a modified version of TDirect2DCanvas to support Direct2D 1.1 and later. For the changes, I followed this guide. It works nicely except it is ten times slower now! Measuring performance was easy: Simple with Direct2D 1.0 it is almost instantly (less than one second for 49 images as shown in the screen dump below while Direct2D 1.1 take roughly ten seconds. The code for rendering the bitmap is the same for both Direct2D 1.0 and 1.0 and is the following: BeginPaint(Handle, PaintStruct); RenderTarget.BeginDraw; RenderTarget.Clear(D2D1ColorF(FBackColor)); if FBitmapToPaint <> nil then begin RenderTarget.SetTransform(FTransform); RenderTarget.DrawBitmap(FBitmapToPaint, nil, 1.0, D2D1_BITMAP_INTERPOLATION_MODE_LINEAR, nil); end; RenderTarget.EndDraw; // Next line only for Direct2D 1.1 version DXGISwapChain.Present1(SyncInterval, PresentFlags, PresentParams); EndPaint(Handle, PaintStruct); RenderTarget is a ID2D1RenderTarget for Direct2D 1.0 and an ID2D1DeviceContext for Direct2D 1.1. FBitmapToPaint is a ID2D1Bitmap. PresentFlags and SyncInterval are always zero. PresentParams is a zeroed TDXGIPresentParameters structure. The code to initialize all the interfaces are inspired by the code shown on the guide I mentioned above. In the application, there are as much such small windows as fit on the application window (49 in the screen dump). The application currently does only image rendering: Loading JPG small files, scaling and rotating to fit the small window used for rendering. Those are thumbnails, so there are maybe 50 or 100 such small window on screen. No geometry, no text, no other drawing. Only a single bitmaps per window. I have not yet used anything specific to Direct2D 1.1. If can switch from one version to the other just by using Delphi provide Vcl.Direct2D unit in the uses clause, or using my own modified version for Direct2D V1.1 and later. My question are: 1) Is Direct2D 1.1 really slower than 1.0? (I suppose not) 2) Which tool (free if possible) can I use to measure everything involved in the creation of the window and the rendering so that I can find out what is slower exactly, hoping to find why it is slower. BTW: I am using Windows 10 1909.
  15. Thanks, I'll have a look at it.
  16. FPiette

    Sniffer tool detection function

    Then your request can't be satisfied because you don't provide any detail. There is no API that I am aware of the is generic across the kind of tool you ask. Please read again @Remy Lebeauanswer because it contain interesting hints.
  17. FPiette

    Sniffer tool detection function

    Do you already have an idea how to do it? Or are you asking that we code it for you?
  18. FPiette

    Comport Serial Port help

    You should open a new message thread for that independent question.
  19. FPiette

    So here's my challemge...

    In a multi-user environment, to increment CoyId, a transaction should be used along with SELECT FOR UPDATE statement and an UPDATE statement. Other database engine may use other syntax.
  20. FPiette

    So here's my challemge...

    Depending on the rest of the application, I would go for SQLite or a full blown MS-SQL Server database.
  21. FPiette

    So here's my challemge...

    If you have a table with your numbered company code, it is easy to find the max number has been allocated for a given company code. Isn't it? What kind of storage do you use? SQL database or other?
  22. FPiette

    debugging crash

    Do you have a chance to test the same program on another computer which has the same Delphi version?
  23. FPiette

    debugging crash

    Do you have the problem since the beginning or it once worked correctly? If it has worked in the past, somehow your debugger is corrupted. If you have no backup, reinstall Delphi.
  24. FPiette

    debugging crash

    Try with a much more simple program, a king of "Hello World" to narrow down the issue. A simple VCL form, with a single button with a click handle calling ShowMessage "Hello World". Compile for debug. Put a break point on the "begin" at the start of OnClick handler. When it, hit "trace into". And tell us what happens.
×