Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Mark-

  1. Hello, Perhaps it is late and I am not seeing the forest for all the trees. Is there a way to use TWSocket.SendTo with a dynamic array? Thanks, Mark
  2. Mark-


    Never mind. I found the issue. A missing @buffer[0] in some packet generation code.
  3. type TMyFunkyRecord = record b:boolean; end; function Something(inB:pointer):pointer; var bRec:TMyFunkyRecord; begin bRec:=TMyFunkyRecord(inB^); if bRec.b then beep; bRec.b:=false; result:=@bRec; end; var bRec,aRec:TMyFunkyRecord; begin bRec.b:=true; aRec:=TMyFunkyRecord(Something(@bRec)^); if not aRec.b then beep; end; You can make it work with "naked" pointers. More trouble than worth to avoid declaring the pointer type. My2c.
  4. His post now show as "Guest". Did he delete his account or...
  5. Mark-


    Hello, Using CreateProcess I am attempting to launch another program of mine. If the "Run this program as administrator", is enabled in the compatibility" tab. all works as expected. If not enabled, I get an OS error: "The requested operation requires elevation". Perhaps the manifest is in error. This is the manifest I am using: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity type="win32" name="Configure" version="" processorArchitecture="x86"/> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="" publicKeyToken="6595b64144ccf1df" language="*" processorArchitecture="*"/> </dependentAssembly> </dependency> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/> </requestedPrivileges> </security> </trustInfo> <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> <application> <!--Windows 7--> <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> <!--Windows 8 and Windows Server 2012--> <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> <!--Windows 8.1 and Windows Server 2012 R2--> <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> <!--Windows 10, Windows Server 2016 and Windows Server 2019--> <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> </application> </compatibility> </assembly> Any ideas? Thanks, Mark
  6. Mark-


    That is correct. I have used and use ShellExecute in other code and will give it a try. Thanks, Mark
  7. Mark-

    Aligning text in a rectangle...

    Hello, I have a need to align some text in a rectangle to the traditional nine locations. The user decides how to align each cell and I wanted to make one call, passing in the vertical and horizontal alignment selections. The text needs to wordbreak and may contain linefeeds. Searching the web, no joy, so I created this test project. Perhaps someone knows a better solution, and will share, and/or this will help another. Cheers, Mark TextAlign.zip
  8. Mark-

    Aligning text in a rectangle...

    It's just to show the code to process the text and alignments, the important part.😉 Your code does not support word wrap or embedded line feeds. It was/is a requirement and stated in the first post. Thanks for playing.
  9. Mark-

    Aligning text in a rectangle...

  10. Mark-

    Aligning text in a rectangle...

    While I am not sure what you are asking, the screen capture, red, looks correct, I will answer: Yes, run the project included in the zip.
  11. It is one of the reasons I am sticking with 10.2,
  12. Mark-


    Hello, Anyone use OpenHardwareMonitorLib.dll in Delphi? https://github.com/openhardwaremonitor Cheers, Mark
  13. HA, not to be harsh, obviously, you have little knowledge of the petrochemical industry. The device you utilized to type in/speak your post includes products from the "Oil" industry.
  14. Not sure it is needs a "fix". pos is case sensitive. A different function would be needed, depending on the value of the flag parameter. Same version.
  15. Did you look at the source code for StringReplace?
  16. Mark-

    ICS FAQ, volunteers wanted

    Hello, I used "HTTrack Website Copier" to download the pages. Do you want me to zip and send it to you? Mark
  17. Mark-

    SMS via my phone..

    Yeah we did lots of testing and used the "read all" because we have total control of the device, it is only used for our SMS access, but could have used other commands to read the messages. All our messages are text only and the connection is serial, the data flow rate is not so high as to be an issue.
  18. Mark-

    SMS via my phone..

    We only found one phone, Nokia C2-01 was the test phone, that did not support reading messages. It might apply to all Nokia phones. We have not had any customers with phones/modems unable to be used. Set the message area AT+CPMS Read all the messages AT+CMGL="ALL" Delete all messages AT+CMGD=0,4'
  19. Mark-

    SMS via my phone..

    Yes one of our apps sends/receives SMS. Sometimes, when the phone USB port is plugged into the computer the phone installs a driver for the USB port and it appears as a MODEM. Other times, e.g. some Samsung phones, you install the driver from Samsung. And other times a cell modem is used. After the phone/modem is plugged in you can see if it appears as a modem in the device manager. Now that you have a modem you use AT commands to send/receive messages. Not all phones/modems implement SMS send/receive the same. I have never seen a "standard". You can find data on the AT commands on the web.
  20. Hello, THttpCli version 8.62 Update: Thinking about it "blocking" is what the code says and what it does. I switched to CloseAsync and that seems to solve the issue. More testing will prove. Is there a better idea? I have a THttpCli component on a TDataModule connected to a camera. When the user closes the main form, I call: HttpCli1.Abort; HttpCli1.Close; Abort returns and Close is called. Close never returns because: if MsgWaitForMultipleObjects(0, Pointer(nil)^, FALSE, 1000, QS_ALLINPUT) = WAIT_OBJECT_0 then MessagePump; is called, and MessagePump calls: Application.ProcessMessages; Ideas? Thanks, Mark
  21. Mark-


    Thanks François
  22. Hello, Delphi 10.2.3, ICS 8.62 I am reading the settings from an Axis video camera. The payload is XML. Example URI: root:admin@ The issue, I form up the message, use PostAsync, the data comes back and all is good. I view the process via Wireshark, I see the “Post” and the reply is “HTTP 1.1 401 Unauthorized” and the reply includes: [truncated]Authorization: Digest username="root",realm="AXIS_WS_ACCC8EE4F05C",nonce="sgpPo3OzBQA=f77c1448ee4c9dfe2a268b430a4f4ee824f78950",uri="/onvif/device_service",response="909198f352f89203fe5701378e615379",qop=auth,nc=00000001,cnonc Different values each time, same fields. THttpCli sends the post again, including the above information, and the camera returns the data. I have tried many things. Changing the “serverAuth”, no difference. Another program, I view the stream and it does not have the same cycle. I must be missing something. Ideas? Thanks, Mark
  23. Thanks for the help Angus. To close this issue. The issue was the time difference between the camera and the PC. The camera rejects the message if the time difference is greater than about 5 seconds. Solution is to read the time in the camera and adjust the transmitted time stamp. Reading the camera time does not require authentication. If the message sent to the camera contains a certain namespace reference, the camera will switch to attempt a digest authentication after the first failed, ONVIF authentication. While ICS handled the "digest" authentication, flawlessly, the double process was not workable for the design goals. Cheers, Mark
  24. Interesting, thanks. More dissection planned.