Jump to content

Mark-

Members
  • Content Count

    207
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Mark-

  1. Mark-

    THttpCli.Close...

    Thanks François
  2. 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@192.168.8.218:80/onvif/device_service 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
  3. 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
  4. Interesting, thanks. More dissection planned.
  5. Thanks for the response. > The component is auto selecting httpAuthDigest Yeah and when I select Digest, same 401 result. > Not sure if the same Authorization: header can be used more than once for subsequent requests, never used Digest myself.  Ditto, > You'll need to check Wireshark on the other application to find out where it finds realm, etc, or if it uses a different authentication mechanism. Yeah, my searching found nothing. I suspect I need to check again.
  6. Hello, > use the THttpRest component The TSslHTTPRest? Altering the URL to remove the username and password made no difference. I added an ICS logger and selected each of the ServerAuth options and all produced the same result. Other than causing a complete failure no change has altered the cycle. Attached is the log file. Cheers, Mark logFileICS.txt
  7. Hello, Thanks for the response. I had all kinds of logging enabled and I could not see the issue. Wireshark is a good tool for seeing outside the program. > setting ServerAuth to httpAuthBasic I get a 401 error. I guess I will return to logging. Mark
  8. Mark-

    RS232 component

    TMS Async works for me. https://www.tmssoftware.com/site/tmsasync.asp
  9. Mark-

    Using the New Edge browser control

    I added this comment. I added a default folder property to the class. Removed: var hr := CreateCoreWebView2Environment( Callback<HResult, ICoreWebView2Environment>.CreateAs<ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler>( CreateEnvironmentCompleted)); Added: hr:=CreateCoreWebView2EnvironmentWithOptions('',PWideChar(FDefaultFolder),nil, Callback<HResult,ICoreWebView2Environment>. CreateAs<ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler>(CreateEnvironmentCompleted));
  10. Hello, Yes, I send SMS messages in one of my applications. A cell phone or modem that supports the AT command set is what I used. There is not an SMS protocol specification. If only sending messages most providers use the same commands. Receiving messages, clearing storage, etc., not all providers support those actions. We tested with Nokia and Samsung phones. I know customers are using other MODEM brands with success. Good luck, Mark
  11. Mark-

    TEdgeBrowser and 10.2.3...

    Hello, Can TEdgeBrowser be used in 10.2.3? I can download and install 10.4 in a VM, copy the component/files to 10.2.3 if it will work. Ideas, other than to switch to 10.4? Thanks. Mark
  12. Mark-

    TEdgeBrowser and 10.2.3...

    The results. All seems to be working. The TDictionary.TryAdd missing was solved with two lines of code.
  13. Mark-

    TEdgeBrowser and 10.2.3...

    > Can TEdgeBrowser be used in 10.2.3? Changing the code in Vcl.Edge. Thanks for the response.
  14. Mark-

    TEdgeBrowser and 10.2.3...

    Well so far, so good. [ Changing the code in Vcl.Edge. ] I had to make changes to every location an inline var or const is used, a few dozen, not too must trouble. Only real pain is when the same var name is used in a function, in different blocks of the function, and the type is different in each block. Now, one line of code that uses TDictionary.TryAdd which does not exist in 10.2. I have not used TDictionary so I need to see if I can change the line to get the same operation using existing TDictionary functions and/or a few more lines of code.
  15. Mark-

    TEdgeBrowser and 10.2.3...

    Yeah I read about it. Thanks for the response.
  16. Mark-

    TEdgeBrowser and 10.2.3...

    Don't know, hence the asking. Thanks for the response.
  17. Hello, Delphi 10.2 connection to MySQL 8.0.18 The TFQuery fetching is controlled by a TDBGrid. The table has 5 records. I have a TFDQuery accessing a table. For the most part no problems. Two table fields are “TEXT” and have about 400 characters per record. The TFDQuery is not fetching or at least not allowing me to get all the characters. For example, one field is 432 characters and accessing the text with .filedValues or .fieldByName.asString or any of the “as” text only returns 308 characters. The break is not on anything weird, in this instance the break is between an “n” and “e”. Looking over all the properties of TFDQuery and TDBGRid, everything seems fine and not limiting the fetch. Ideas? Thanks, Mark
  18. Not sure where the problem is located. Changed the column type from TEXT to VARCHAR(4095) and now all the characters are fetched. Anyone used the TEXT data type of MySQL with FireDAC (using ODBC) and a DBGrid? When the type is TEXT is appears in the grid as {WIDEMEMO}. Perhaps a setting I am missing that limits the fetch size for WIDEMEMO.
  19. Ralf, thanks for the response. I am using ODBC and updated the driver from 8.0.10 to 8.0.21, no joy. I did find if I issue an SQL statement for a specific record all the data for the fields is returned.
  20. Mark-

    TStopwatch.Elapsed

    Same here plus, I can verify all the design and functionality goals are achieved. In some cases I write the documentation before the code. Especially when the goal is stated in one line but contains many facets.
  21. Hello, Has anyone converted this unit to work on 64 bit and 32 bit? Thanks, Mark unit uDGVMUtils; interface (******************************************************************************* uDGVMUtils -- is an attempt to create one of the best virtual machine detector methods, feel free to contribute in any way you wish. Version 1.1, 2010-01-15 Copyright© you are free to use it for comercial, private or both purposes Contributors: Dorin Duminica Chee Meng *******************************************************************************) type TVMWareVersion = ( vvExpress = 1, vvESX, vvGSX, vvWorkstation, vvUnknown, vvNative); const VMWARE_VERSION_STRINGS: array [TVMWareVersion] of string = ( 'Express', 'ESX', 'GSX', 'Workstation', 'Unknown', 'Native'); type TVirtualMachineType = ( vmNative, vmVMWare, vmWine, vmVirtualPC, vmVirtualBox); const VIRTUALMACHINE_STRINGS: array[TVirtualMachineType] of string = ( 'Native', 'VMWare', 'Wine', 'Virtual PC', 'Virtual Box'); function IsRunningVMWare(var AVMWareVersion: TVMWareVersion): Boolean; overload; function IsRunningVMWare: Boolean; overload; function IsRunningWine(var AWineVersion: string): Boolean; overload; function IsRunningWine: Boolean; overload; function IsRunningVirtualPC: Boolean; function IsRunningVBox: Boolean; function IsRunningVM(var AVMVersion: string): Boolean; overload; function IsRunningVM: Boolean; overload; implementation uses SysUtils,Windows,Vcl.Dialogs; function IsRunningVMWare(var AVMWareVersion: TVMWareVersion): Boolean; const CVMWARE_FLAG = $564D5868; var LFlag: Cardinal; LVersion: Cardinal; begin LFlag := 0; try asm push eax push ebx push ecx push edx mov eax, 'VMXh' mov ecx, 0Ah mov dx, 'VX' in eax, dx mov LFlag, ebx mov LVersion, ecx pop edx pop ecx pop ebx pop eax end; except // uncomment next two lines if you wish to see exception // on E: Exception do // ShowMessage(E.message); end; // trye if LFlag = CVMWARE_FLAG then begin Result := True; case LVersion of 1: AVMWareVersion := vvExpress; 2: AVMWareVersion := vvESX; 3: AVMWareVersion := vvGSX; 4: AVMWareVersion := vvWorkstation; else AVMWareVersion := vvUnknown; end end else begin Result := False; AVMWareVersion := vvNative; end; // if LFlag = CVMWARE_FLAG then begin end; function IsRunningVMWare: Boolean; var LVMWareVersion: TVMWareVersion; begin Result := IsRunningVMWare(LVMWareVersion); end; function IsRunningWine(var AWineVersion: string): Boolean; type TWineGetVersion = function: PAnsiChar;{$IFDEF Win32}stdcall;{$ENDIF} TWineNTToUnixFileName = procedure (P1: Pointer; P2: Pointer);{$IFDEF Win32}stdcall;{$ENDIF} var LHandle: THandle; LWineGetVersion: TWineGetVersion; LWineNTToUnixFileName: TWineNTToUnixFileName; begin Result := False; AWineVersion := 'Unknown'; LHandle := LoadLibrary('ntdll.dll'); if LHandle > 32 then begin LWineGetVersion := GetProcAddress(LHandle, 'wine_get_version'); LWineNTToUnixFileName := GetProcAddress(LHandle, 'wine_nt_to_unix_file_name'); if Assigned(LWineGetVersion) or Assigned(LWineNTToUnixFileName) then begin Result := True; if Assigned(LWineGetVersion) then AWineVersion := ANSIString(LWineGetVersion); // AWineVersion := StrPas(LWineGetVersion); end; // if Assigned(LWineGetVersion) or ... FreeLibrary(LHandle); end; // if LHandle > 32 then begin end; function IsRunningWine: Boolean; var LWineVersion: string; begin Result := IsRunningWine(LWineVersion); end; function IsRunningVirtualPC: Boolean; asm push ebp; mov ebp, esp; mov ecx, offset @exception_handler; push ebx; push ecx; push dword ptr fs:[0]; mov dword ptr fs:[0], esp; mov ebx, 0; // Flag mov eax, 1; // VPC function number // call VPC db $0F, $3F, $07, $0B mov eax, dword ptr ss:[esp]; mov dword ptr fs:[0], eax; add esp, 8; test ebx, ebx; setz al; lea esp, dword ptr ss:[ebp-4]; mov ebx, dword ptr ss:[esp]; mov ebp, dword ptr ss:[esp+4]; add esp, 8; jmp @ret1; @exception_handler: mov ecx, [esp+0Ch]; mov dword ptr [ecx+0A4h], -1; // EBX = -1 ->; not running, ebx = 0 -> running add dword ptr [ecx+0B8h], 4; // ->; skip past the call to VPC xor eax, eax; // exception is handled @ret1: end; function IsRunningVBox: Boolean; function Test1: Boolean; var LHandle: Cardinal; begin Result := False; try LHandle := LoadLibrary('VBoxHook.dll'); Result := (LHandle <> 0); if Result then FreeLibrary(LHandle); except end; // trye end; // function Test1: Boolean; function Test2: Boolean; var LHandle: Cardinal; begin Result := False; try LHandle := CreateFile( '\\\\.\\\VBoxMiniRdrDN', GENERIC_READ, FILE_SHARE_READ, NIL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); Result := (LHandle <> INVALID_HANDLE_VALUE); if Result then CloseHandle(LHandle); except end; // trye end; // function Test2: Boolean; begin Result := Test1 or Test2; end; function IsRunningVM(var AVMVersion: string): Boolean; begin AVMVersion := VIRTUALMACHINE_STRINGS[vmNative]; Result := True; if IsRunningWine then AVMVersion := VIRTUALMACHINE_STRINGS[vmWine] else if IsRunningVMWare then AVMVersion := VIRTUALMACHINE_STRINGS[vmVMWare] else if IsRunningVirtualPC then AVMVersion := VIRTUALMACHINE_STRINGS[vmWine] else if IsRunningVBox then AVMVersion := VIRTUALMACHINE_STRINGS[vmVirtualBox] else begin AVMVersion := VIRTUALMACHINE_STRINGS[vmNative]; Result := False; end; end; function IsRunningVM: Boolean; var LVMVersion: string; begin Result := IsRunningVM(LVMVersion); end; end.
  22. Mark-

    XML to SVG

    Our main product is very graphic intensive. The customers design and animate the graphics, in an editor we created, for their operators to use for controlling...anything that can be controlled. I asked a few years ago if SVG was important and was told no. I am going to reopen the question.
  23. Mark-

    XML to SVG

    I do not want to download and use the SVG code. The project source looks good. No idea about the SVG definition. The Pascal stuff is fine for testing. Why the test? Do you have a reason for the code other than an experiment?
×