Jump to content

david_navigator

Members
  • Content Count

    156
  • Joined

  • Last visited

Everything posted by david_navigator

  1. david_navigator

    RFID LLRP

    I'm investigating how to get my delphi app to talk to a specific RFID reader. This seems to use a protocol called LLRP. Googling has come up with no examples of using this protocol from a Delphi app but I wondered if anyone here had done anything similar or had come across anything useful ? (LLRP is a binary protocol over TCP/IP, the Internet standard transport protocol. It is an asymmetric protocol where a client implementation of LLRP (hosted in the application software) sends commands to a reader implementation of LLRP (hosted in the reader). The reader implementation answers commands by using responses, and also generates asynchronous data called events and reports) Thanks David
  2. david_navigator

    RFID LLRP

    Thanks. I've now discovered that this vendor has an https REST API and also support MQTT so hopefully I can work at a much higher level !
  3. david_navigator

    RFID LLRP

    Thanks. Yes I know what to do, I was just hoping that someone else had already done it !! No point in reinventing the wheel.
  4. david_navigator

    Help debugging TNotificationCenter

    I am getting an Access Violation in the VCL TNotificationCenter, however how it occurs is strange and I can't seem to debug far enough in to the delphi source to work out why. I have a delphi form with an editbox. The edit box has an OnKeyDown event. Within that OnKeyDown event we call a routine to check if the key was VK_RETURN and if it was, we then process the content of the edit box (Method ProcessBarcodeScan) and in certain circumstances we create a Windows 10 (Toast) notification. (The notification makes no reference to the edit box or any of it's properties.) Now, the odd bit, if I type in to the edit box, then everything works as it should and there are no errors and the "toast" pops up. If I populate the Edit box via a SendMessage thus SendMessage(BarcodeEdit.Handle, WM_CHAR, lKeyCode, 0); and then call the ProcessBarcodeScan method via a PostMessage, thus PostMessage(handle, pm_ProcessBarcodeScan, WPARAM(lKeyCode), LPARAM(Ord(TRUE))) again all works correctly. However, if I populate the edit box via the SendMessage as above and then call ProcessBarcodeScan via a SendMessage thus SendMessage(handle, pm_ProcessBarcodeScan, WPARAM(lKeyCode), LPARAM(Ord(TRUE))); application.ProcessMessages; I get an Access violation, which stepping through the code gets me to class function TToastTemplateGenerator.GetXMLDoc(const ANotification: TNotification): Xml_Dom_IXmlDocument; ... ... Result := TToastNotificationManager.Statics.GetTemplateContent(LTemplateType); but the only place I can find GetTemplateContent is in Winapi.UI.Notifications class function TToastNotificationManager which won't accept a break point This is my Notification code procedure TDMNexusConnect.SendWin10Notification(aTitle, aAlertBody: string); var lNotification: TNotification; begin lNotification := NotificationCenter.CreateNotification; try lNotification.Name := format('Windows10Notification%d', [GetTickcount]); lNotification.Title := aTitle; lNotification.AlertBody := aAlertBody; NotificationCenter.PresentNotification(lNotification); finally lNotification.Free; end; end; and this is the Access Violation. exception class : EAccessViolation exception message : Access violation at address 03C4EBE9 in module 'HireTrackNX.exe'. Read of address 00000000. thread $2c24: 03c4ebe9 +015 HireTrackNX.exe System.Win.Notification TNotificationWinRT.Destroy 77e64ee1 +021 ntdll.dll KiUserExceptionDispatcher 00407984 +004 HireTrackNX.exe System 34 +0 @FreeMem 0040cc24 +01c HireTrackNX.exe System 34 +0 @UStrClr 03c4eaa6 +046 HireTrackNX.exe System.Win.Notification TNotificationWinRT.Create 03c4deb3 +02f HireTrackNX.exe System.Win.Notification TNotificationCenterWinRT.DoPresentNotification 03c59b40 +018 HireTrackNX.exe System.Notification TCustomNotificationCenter.DoPresentNotification 03c59c52 +002 HireTrackNX.exe System.Notification TCustomNotificationCenter.PresentNotification 03de9d23 +0a7 HireTrackNX.exe DMNexus 2440 +7 TDMNexusConnect.SendWin10Notification
  5. david_navigator

    SMTP Server -> Client

    I have an old app that we use frequently that only support sending SMTP emails via an unauthenticated connection on port 25. Of course these days no ISP allows this kind of connection. Is my simplest solution to write an app that it can connect to to send any emails, (acting as an SMTP server) and then send the email on (acting as an SMTP client) using modern connection techniques ? I was thinking of Indy (SMTP Server -> SMTP Client), but maybe there's some components that already do this or even better an off the shelf (cheap) solution ? Cheers David
  6. One of my customer's has started to get this error connecting my app to outlook.office365.com via IMAP. He's connecting to port 993 using Implicit TLS. He says that my app has been working for ages and has just started throwing this error, so I'm assuming that something has changed in the world of Microsoft - yet none of my other customers are reporting the error nor can I find anything online that suggest a change that Microsoft may have rolled out in the past week. I get the same error if I try on my PC with his Microsoft credential. I don't really understand what the error means though to then try and diagnose further what might be going on or settings he needs to look for in his account. Any help much appreciated. David
  7. david_navigator

    FMX in VCL app - working natively ?

    I just accidentally instantiated an FMX form in my VCL app and no errors were thrown (nor warnings at compile time). It just seems to work. Is this a fluke or does delphi natively now support VCL & FMX forms in the same app ?
  8. david_navigator

    Get It UI control ?

    Is there a VCL control that does this ?
  9. david_navigator

    Get It UI control ?

    Thank you
  10. david_navigator

    Thinfinity VirtualUI - cloud-based conversion

    Yes. The app is designed to be used on a desktop size device.
  11. david_navigator

    Thinfinity VirtualUI - cloud-based conversion

    Assuming that your IP address ends in .143 - I can see that you successfully authenticate too.
  12. david_navigator

    Thinfinity VirtualUI - cloud-based conversion

    Very odd. Let's see if their support comes up with something next week.
  13. david_navigator

    Thinfinity VirtualUI - cloud-based conversion

    I'll raise a ticket to Thinfinity and see if they have any suggestions.
  14. david_navigator

    Thinfinity VirtualUI - cloud-based conversion

    Odd. Never seen that before (and I have 100's of users). What browser are you using ? Are you on a touch screen device ? Here's a video clip of what you should see https://Navigator.tinytake.com/msc/OTUyNDkyMF8yMzEzMTE5NQ
  15. david_navigator

    Thinfinity VirtualUI - cloud-based conversion

    Odd. You should see something like this. Nothing required client side.
  16. david_navigator

    Thinfinity VirtualUI - cloud-based conversion

    I have a massive app that we converted to use Thinfinty. You can play with it here if you'd like to see the experience from a user POV https://trial.hiretracknx.com:6580/ Alias: ashoka Username: HireTrack_Admin Password: 1234 There are two areas where we still have issues - some DevEx components don't render properly in certain circumstances - e.g on the first form you see, one of the buttons doesn't get drawn fully until you move your mouse over it. I do have a fix for this issue, but there are other DevEx issues apparently, though we haven't hit any yet. The other issue I've come across is launching a form that uses an embedded browser. That doesn't work correctly, though Thinfinity people are very reactive and have promised me a fix in the next week of so. There are areas where we have If Thinfinity.active then in our code - especially anything that involves uploading or downloading files. My biggest gripe with Thinfinity is the license management. We have our app running across about 10 servers, with one licensing server, but there's no way to see which server is using how many licenses - e.g. I can see that 50 licenses are in use, but not which machines are using them. This might not matter for your scenario, but it's an annoyance in ours. David
  17. david_navigator

    Pascal script memory management

    One of my apps uses PascalScript to allow the user to customise various tasks. However as I've recently discovered it's really easy for the end user to write a script that leaks loads of memory. As far as I can see PascalScript doesn't do any kind of memory tidy up when the script ends - it expects the script's author to do that. Is there some way to encapsulate the instantiated TPSScript object in such a way that I can free any memory when the script object is freed ? Something like (in psuedo code) Create memory container; PSScript:=TPSScript.Create(nil); PSScript.Script.Assign(fScript); PSScript.Compile; PSScript.Execute; PSScript.Free; Destroy memory container;
  18. david_navigator

    Pascal script memory management

    Thanks, but I meant "only make sure to not use a shared memory memory manager with the exe."
  19. david_navigator

    Pascal script memory management

    @Kas Ob. could you explain in a little more detail about the memory manager please ?
  20. david_navigator

    Pascal script memory management

    I was hoping there was something that the OS could deal with. If I made the scripting engine a stand alone EXE then whatever the user wrote, Windows would clean up when the exe closed. I was hoping that there might be some way to achieve that within my app. Doing some research I see that Job Objects details "The virtual memory of job objects isolates the memory behavior of a group of processes (tasks) from the rest of the system", but so far little about how this is achieved.
  21. I have some inherited code that does some complex maths using a recursive function (i.e the function calls itself). Last night a customer had a situation where running the routine killed the app. My belief is that the app ran out of stack space due to this routine calling itself multiple times and thus died. Is there anyway to detect this is likely to happen so that the code can be aborted with a message instead? David
  22. david_navigator

    Code using TIdIMAP4 driving me mad !!

    I have the following fairly simple code to connect to my IMAP server, however I'm doing something wrong, but I can't work out what. The first time I click the button, I always get ExceptionMessage="Socket Error # 10061 Connection refused." ExceptionName="EIdSocketError" However if I then click on the button again, the IMAP control connects to my server just fine and I can retrieve anything I like without a problem. I've tried setting various properties in various different orders, but that makes no difference, so why does it not work the first time ? If I make TheImap & IdSSLIOHandlerSocketOpenSSL1 local to the button1click procedure, rather than class level, then TheIMAP never connects, so that seems to rule out something external blocking the connection first time round and points to something not being initialized correctly, but what am I missing ? type TForm3 = class(TForm) Button1: TButton; procedure FormCreate(Sender: TObject); procedure Button1Click(Sender: TObject); private { Private declarations } TheImap: TIdIMAP4; IdSSLIOHandlerSocketOpenSSL1: TIdSSLIOHandlerSocketOpenSSL; public { Public declarations } end; var Form3: TForm3; implementation {$R *.dfm} procedure TForm3.FormCreate(Sender: TObject); begin TheImap := TIdIMAP4.Create(nil); IdSSLIOHandlerSocketOpenSSL1 := TIdSSLIOHandlerSocketOpenSSL.Create(TheImap); end; procedure TForm3.Button1Click(Sender: TObject); begin if TheImap.connected then TheImap.Disconnect; TheImap.Host := 'xxxxxxxxx'; TheImap.Username := 'xxxxxxx'; TheImap.Password := 'xxxxxxx'; TheImap.Port := 143; with IdSSLIOHandlerSocketOpenSSL1 do begin Destination := format('%s:%d', [TheImap.Host, TheImap.Port]); // e.g 'imap.gmail.com:993'; Host := TheImap.Host; MaxLineAction := maException; Port := TheImap.Port; DefaultPort := 0; SSLOptions.SSLVersions := [sslvTLSv1, sslvTLSv1_1, sslvTLSv1_2]; SSLOptions.Mode := sslmUnassigned; SSLOptions.VerifyMode := []; SSLOptions.VerifyDepth := 0; end; TheImap.IOHandler := IdSSLIOHandlerSocketOpenSSL1; TheImap.UseTLS := utUseImplicitTLS; try TheImap.Connect; except on E: exception do showmessage(E.Message); end; if TheImap.Connected then showmessage('Connected ok'); end;
  23. david_navigator

    Code using TIdIMAP4 driving me mad !!

    Though I can't actually change any of this as it's not my server. I just had to go with what I could to get my delphi app to talk to it.
  24. david_navigator

    Code using TIdIMAP4 driving me mad !!

    Here you go
  25. david_navigator

    Code using TIdIMAP4 driving me mad !!

    >Are you sure you are supposed to be using implicit TLS on port 143, and not explicit TLS instead? If I change the test code above to use explicit then TheImap.Connect; never returns. Have I missed setting something else or if this just a strange server ?
×