Jump to content

msd

Members
  • Content Count

    79
  • Joined

  • Last visited

Everything posted by msd

  1. Hello, FirebirdSQL has a replacement in Delphi for the null value, and it is called NaN (non-numeric value). I can't prevent this situation, ID DB, so I need to check if my variable (Real type) and my DataSet field (TFloat type) are numeric or not (nil, null, nan, etc.). Thanks in advance...
  2. msd

    FirebirdSQL 4 (64bit) Performance

    My question on the Firebird Google Group is the same as if I threw it in a well without any reaction :-)
  3. msd

    FirebirdSQL 4 (64bit) Performance

    Hello, Because of middle tier technologies I need to use Windows Server (without desktop experience). So I only have "problem" which scenario is best performance/resource for FirebirdSQL v4 64 bit Windows... Thanks anyway for advice...
  4. Hello Experts, I installed Delphi 12 and started to recompile all of my components from scratch (because I have a license for only full source code components). Now, I can see some strange situation: every time I have some TList descendant VCL with some items function in 64-bit variant, I get an error. Every item has an error because some property of the list component is not defined. In Delphi 11.3, which was my earlier Delphi version, everything is working fine. Is there any upgrade for which I raised this problem? P.S. In 32-bit varioant, everything is working fine. Thanks in advance for any help and assistance... Sample if (FXLSGridSelection[FXLSGridSelection.Count - 1].RangeType = rtCol) then begin FXLSGridSelection[FXLSGridSelection.Count - 1].Row2 := FXLSGridSelection[FXLSGridSelection.Count - 1].Row2 - 1; end; RangeType and Row1 or Row2 is not defined (in64bit) in 32bit is fine...
  5. Hello, Does anyone use LZMA from System.Zip in Delphi 11 and 12? I try it, but I get an error that this type of compression is not supported. Zip := TZipFile.Create; try Zip.Open(db.zipFile, zmWrite); Zip.Add(db.fbkFile, ExtractFileName(db.fbkFile), TZipCompression.zcLZMA ); Zip.Close; except end; Zip.Free; Thanks in the advance...
  6. msd

    Delphi 11 & 12 LZMA Compression

    Thanks to all supporters & friends, it is working fine now in 32bint/64bit.
  7. msd

    Delphi 11 & 12 LZMA Compression

    Hello, What can be problem here, in 32bit everything works fine, but in 64 bit I have an error unit Threads; interface uses System.Win.Crtl, Winapi.Windows, LzmaTypes, System.Classes; type TCEvent = THandle; TCSemaphore = THandle; TCCriticalSection = TRTLCriticalSection; TCAutoResetEvent = TCEvent; TCThread = THandle; TThread_Func_Type = Pointer; function{$IFDEF UNDERSCOREIMPORTNAME}__beginthreadex{$ELSE}_beginthreadex{$ENDIF}(__security_attr: Pointer; __stksize: Cardinal; __start: TThread_Func_Type; __arg: Pointer; __create_flags: Cardinal; var __thread_id: Cardinal): Cardinal; cdecl; external msvcrt name '_beginthreadex'; implementation {$IFDEF Win32} {$L Win32\Threads.obj} {$ELSE} {$L Win64\Threads.o} {$ENDIF} end. Error is: [dcc64 Error] Threads.pas(23): E2003 Undeclared identifier: 'msvcrt' Thanks for the help and assistance in the advance...
  8. msd

    Delphi 11 & 12 LZMA Compression

    I'll give it a try, but there are some errors in OBJ files for x64 architecture. If I do the job, I'll publish it on GitHub.
  9. msd

    Delphi 11 & 12 LZMA Compression

    Hello Anders, I have an excellent solution for Delphi LZMA with extremely good compression and a very fast process, but it doesn't work under 64-bit environments. This is my component for LZMA: https://github.com/ccy/delphi-zip. and if someone can check the 64-bit setup, it will be great. Thanks to all in advance...
  10. msd

    Delphi 12 List Objects x64

    Hello, Remy Lebeau, I was made to typecast to Integer and NativeInt, and everything is working fine now. Your post was a little bit late, but I used this method that you described here. Thanks anyway for all the information...
  11. msd

    Delphi 12 List Objects x64

    Solved, thanks to Uwe 🙂
  12. msd

    Delphi 12 List Objects x64

    I was given some deep debugging procedures. The problem is in TList. Count when I want to build a project in 64-bit version. So count is the core of the problem. When I set a fixed integer number, everything is working fine. P.S. In the 32-bit version, everything is working correctly with the count method. P.P.S. this is not working on delphi 64 -> LastCol := Cols[Cols.Count - 1].ColNumber + 1; this is working fine on delphi 64 -> LastCol := Cols[Integer(Cols.Count) - 1].ColNumber + 1;
  13. msd

    Delphi 12 List Objects x64

    Hello, 1. FXLSGridSelection: TMapRow; 2. TMapRow = class(TList) This is only a sample; every component that has a TList type has the same problem.
  14. Hello friends, I found this library, named Chilkat Delphi DLL API (https://www.chilkatsoft.com/), and this library has a lot of classes and tools for SSH, SFTP, FTP2, HTTP, REST, socket/TLS, IMAP,... In demo mode, I try RS232, HTTP Server & Client, FTP Server & Client, TCP Sockets, Mail, Zip, Json, XML, Smartcard, Certificates, and Task (multythreading). I have a small distance from using DLL's in Delphi because of speed of development and I prefer full source code, but I have a few component sets that cover all of these functionalities, and I ask for advice from experts. Does anyone use this library set? Is there any performance comparison between DDL and native Delphi libraries? Is it thread-safe? Is it "smart" to replace a lot of components (maintained or not maintained anymore) with a library like the Chilkat Delphi DLL API? Thank you in advance to all of you for any advice and information...
  15. Hello, I have small problem with converting smartcard response to x509 certificate. It look like 3 step process. 1. Smartcard return HEX response 30 82 05 D2 30 82 04 BA A0 03 02 01 02 02 0E 62 20 97 1F 98 E6 F2 89 00 00 00 00 14 AF 30 0D 06 09 2A 86 48 86 F7 0D 01 01 0D 05 00 30 49 31 0B 30 09 06 03 55 04 06 13 02 52 53 31 17 30 15 06 03 55 04 0A 13 0E 50 6F 72 65 73 6B 61 20 55 70 72 61 76 61 31 21 30 1F 06 03 55 04 03 13 18 53 61 6E 64 62 6F 78 20 53 55 46 20 49 73 73 75 69 6E 67 20 43 41 20 31 30 1E 17 0D 32 32 30 31 32 35 30 38 31 39 35 38 5A 17 0D 32 35 30 31 32 35 30 38 32 39 35 38 5A 30 81 C7 31 0B 30 09 06 03 55 04 06 13 02 52 53 31 1B 30 19 06 03 55 04 08 0C 12 D0 9F D0 BE D0 B6 D0 B0 D1 80 D0 B5 D0 B2 D0 B0 D1 86 31 13 30 11 06 03 55 04 07 0C 0A 50 6F C5 BE 61 72 65 76 61 63 31 17 30 15 06 03 55 04 09 13 0E 4D 61 6A 61 6B 6F 76 73 6B 6F 67 20 31 35 31 1B 30 19 06 03 55 04 0A 13 12 4D 53 44 20 41 67 65 6E 63 69 6A 61 20 7A 61 20 49 54 31 1B 30 19 06 03 55 04 0B 13 12 4D 53 44 20 41 67 65 6E 63 69 6A 61 20 7A 61 20 49 54 31 11 30 0F 06 03 55 04 05 13 08 51 42 56 55 41 53 4D 52 31 20 30 1E 06 03 55 04 03 13 17 51 42 56 55 20 4D 53 44 20 41 67 65 6E 63 69 6A 61 20 7A 61 20 49 54 30 82 01 22 30 0D 06 09 2A 86 48 86 F7 0D 01 01 01 05 00 03 82 01 0F 00 30 82 01 0A 02 82 01 01 00 B3 F7 B3 77 B0 4D FC E8 B1 57 1E DD A1 73 E1 00 2A 39 A1 C6 CE 56 8F 8E 16 9E B6 87 F1 B5 6B F9 7B 28 89 22 AA 2E 07 CB 06 AA CF 24 E0 8C A9 73 49 5E C8 2E 75 54 44 C0 D8 14 F5 AD 10 9C BC EB 10 4E 2A 78 44 3D 00 92 3F 1A F4 6F 2D 27 AB 1F C3 80 D9 66 31 24 9B 1E 0E F6 2E 77 62 D6 6A 61 A0 32 01 90 A6 5A C0 5E 48 5B ED 1E 2A 8C 79 46 01 99 23 32 03 5E 9F A1 0B 93 17 2E 89 52 DA 99 BF BF 5A CB 81 78 D7 5C 48 FE C9 07 96 83 4F 9F 74 32 D7 87 2F C4 BF BA 41 CC 91 AF 73 28 E9 D0 1D 2D A2 C0 91 08 D0 E4 60 5A 4D DB 0C 5C 7F B5 B4 C1 8A CA 19 1D 46 27 68 D1 97 1B 21 5E 9F 5A 5C 6E B4 80 99 EE A6 CB FD 65 4B 1F 1C 91 DE 38 AA DB F8 B0 E5 C2 C0 E8 C5 16 37 B5 18 EF 80 0A 3A F7 AA 2D F2 C2 64 25 7C CC F9 1E 31 C8 67 A4 38 6D DE BE 7B D2 09 49 BE 09 5B 2B 24 0A 26 71 02 03 01 00 01 A3 82 02 37 30 82 02 33 30 0F 06 03 55 1D 13 01 01 FF 04 05 30 03 02 01 00 30 0E 06 03 55 1D 0F 01 01 FF 04 04 03 02 04 90 30 17 06 03 55 1D 25 04 10 30 0E 06 0C 2B 06 01 04 01 83 86 20 05 08 03 03 30 81 C5 06 03 55 1D 20 04 81 BD 30 81 BA 30 81 B7 06 0C 2B 06 01 04 01 83 86 20 05 08 04 02 30 81 A6 30 32 06 08 2B 06 01 05 05 07 02 01 16 26 68 74 74 70 3A 2F 2F 70 6B 69 2E 73 61 6E 64 62 6F 78 2E 73 75 66 2E 70 75 72 73 2E 67 6F 76 2E 72 73 2F 70 6B 69 30 70 06 08 2B 06 01 05 05 07 02 02 30 64 1E 62 00 73 00 61 00 6E 00 64 00 62 00 6F 00 78 00 55 00 73 00 65 00 20 00 70 00 4B 00 49 00 53 00 72 00 62 00 69 00 6A 00 61 00 53 00 61 00 6E 00 64 00 62 00 6F 00 78 00 20 00 69 00 73 00 73 00 75 00 61 00 6E 00 63 00 65 00 50 00 6F 00 6C 00 69 00 63 00 79 00 20 00 63 00 6C 00 61 00 73 00 73 00 32 30 32 06 0B 2B 06 01 04 01 83 86 20 05 08 05 04 23 68 74 74 70 73 3A 2F 2F 61 70 69 2E 73 61 6E 64 62 6F 78 2E 73 75 66 2E 70 75 72 73 2E 67 6F 76 2E 72 73 30 18 06 0B 2B 06 01 04 01 83 86 20 05 08 06 04 09 31 30 34 37 37 35 37 33 37 30 1D 06 03 55 1D 0E 04 16 04 14 3C 93 36 92 AE 4C E5 65 BD C9 CE 8B F9 B0 BD A1 17 CE 9E F6 30 1F 06 03 55 1D 23 04 18 30 16 80 14 33 24 82 AB BB 7B F1 55 69 81 18 B8 DE 97 1B 0B DF E4 A1 E1 30 4A 06 03 55 1D 1F 04 43 30 41 30 3F A0 3D A0 3B 86 39 68 74 74 70 3A 2F 2F 70 6B 69 2E 73 61 6E 64 62 6F 78 2E 73 75 66 2E 70 75 72 73 2E 67 6F 76 2E 72 73 2F 70 6B 69 2F 53 55 46 49 43 41 31 53 61 6E 64 62 6F 78 2E 63 72 6C 30 55 06 08 2B 06 01 05 05 07 01 01 04 49 30 47 30 45 06 08 2B 06 01 05 05 07 30 02 86 39 68 74 74 70 3A 2F 2F 70 6B 69 2E 73 61 6E 64 62 6F 78 2E 73 75 66 2E 70 75 72 73 2E 67 6F 76 2E 72 73 2F 70 6B 69 2F 53 55 46 49 43 41 31 53 61 6E 64 62 6F 78 2E 63 65 72 30 0D 06 09 2A 86 48 86 F7 0D 01 01 0D 05 00 03 82 01 01 00 9A 4F CE 46 7B E8 8F 14 D4 E3 D8 6A 83 7D EC 6E 21 3E F7 8D 7A E8 3C D9 F5 68 9F 73 88 AD B8 7E 0D 5E 4A 34 15 68 11 0E A8 74 A6 EA F6 C0 9C C4 0C 2D 9B A6 7D CD 10 8E FE AC 5A 28 54 CF 59 C4 B9 8A D0 EB B6 58 09 52 10 0E D1 27 56 3B 5D 22 0B 1E 88 AF C3 8F 8E 38 11 96 EE 57 79 98 86 82 9E BF 09 E7 E7 D4 F0 13 E4 6D 37 EB 51 F8 92 BD 05 BA A8 CA 53 B7 3B F4 DB D1 9F 71 A4 9F BC 9D 53 DF 84 85 EE CA AA C5 E7 9C C3 F9 48 3F 90 75 B1 BA 22 49 75 4D 1D 6E D0 D5 5C DB 66 D4 9E 7B 14 C5 28 A8 20 83 B7 64 E1 7B A1 EF 5F 9E 93 8F D4 88 F7 38 D8 38 90 9A FA 40 55 9D 61 6F 14 5C 75 B7 4D F8 34 CB FF 01 2E 42 1B B5 B3 9A 94 CA 92 7B 6E 6A 49 C7 EC B6 AF 1B 2F 19 BB 5D 6F 99 67 8E A3 C4 86 B5 A4 8E A9 44 25 29 CD 08 E0 83 0E A9 F0 22 62 EF 1F 78 76 57 31 80 C6 F7 26 BC 2. This HEX response I need to convert to Byte Array 3. I need to convert Byte Array to text representation (string, widestring, ...) I need some function (if Delphi has it or custom) for HEX to ByteArray and then ByteArray to TEXT ? Thanks for the help in advance...
  16. msd

    Hext to Byte to Text = x509 cert

    Very, very, very good and useful toolset with great documentation and a lot of features 🙂 Next weekend we are doing serious testing for ICS and middleware (we have a lot of net-based projects and we need to add a unique solution for online and network operations and one big KBMMW-based project that needs to be refreshed because of performance, security, and stability of data). Thanks again for all the information...
  17. msd

    Hext to Byte to Text = x509 cert

    Hello, Kas Ob, Your function works perfectly, and thanks for this sample method. I want to ask one more question: which library or how to completely parse the X509 cert from Delphi to get all the details and data + public key? Thanks in advance...
  18. msd

    Hext to Byte to Text = x509 cert

    The original info from the official documentation is that I got, for example, this 00 00 08 99 7D FB 1A 03 8D 7E A4 C6 80 00 response. I need to convert this data from hex to bytes and use half for the control sum and another half for the total sum. As I can see in their example, they created 2 separate arrays of bytes, set the first byte to 00, and then added the rest of the 7 from the response. I try to convert this method in Delphi's way like this: SetLength(answer, 14); answer[00] := $00; answer[01] := $00; answer[02] := $08; answer[03] := $99; answer[04] := $06; answer[05] := $F6; answer[06] := $5A; answer[07] := $03; answer[08] := $8D; answer[09] := $7E; answer[10] := $A4; answer[11] := $C6; answer[12] := $80; answer[13] := $00; SetLength(bb, 16); bb[0] := 0; Move(answer[0], bb[1], 7); bb[8] := 0; Move(answer[7], bb[9], 7); Move(bb[0], controlSum, SizeOf(Int64)); Move(bb[8], totalSum, SizeOf(Int64)); in this example controlSum is 3.693.490,87 and totalSum is 100.000.000.000,00. this is values behind this response in hex format. Thanks one again for all...
  19. Hello friends, I need some advices about how to use APDU Commands on Smart Cards with Delphi using T1 Communication Protocol. Thanks for any advice and useful help in advance...
  20. Hello, This is what I found as very good delphi tools for work with APDU commands https://github.com/johnidm/PCSCSmartCardComponent
  21. msd

    Hext to Byte to Text = x509 cert

    Hello FPiette , Yes, it is an array of bytes, and I represented it as a formated string in my first post. Hello, Kas Ob. Your demo is working fine; it is an ASN.1 x509 certificate. I took a long time to study all aspects of this post, and I found that my smart card always returns TBytes as a response, like it was represented in my first post. So I have one more question about this subject (I'll give you a sample). When I call some kind of SUM from Smart Card over the APDU command, I get an answer like this: 00 00 08 99 7D FB 1A 03 8D 7E A4 C6 80 00 (this is a response in HEX format as TBytes in Delphi). In this answer, I have the first 7 bytes as the control sum and the second 7 bytes as the total sum (I know that the second number is 1.000.000.000). My question is how to convert the array of bytes (TBytes data type) to a string or number in this case. P.S. I can give you a piece of code in Java that is working for this sample: ByteBuffer bb = ByteBuffer.allocate(16); bb.put((byte)0); bb.put(answer.getData(), 0, 7); bb.put((byte)0); bb.put(answer.getData(), 7, 7); bb.position(0); long controlSum = bb.getLong(); long totalSum = bb.getLong(); Thanks for all the help and assistance in advance.
  22. msd

    Hext to Byte to Text = x509 cert

    Hello, Kas Ob, Your sample works fine, but I need to convert the HEX response to bytes and then to text representation (so this function doesn't work in the second step). I get responses in Delphi as TBytes.
  23. msd

    Work with PDF documents

    Hello Developers, I have one specific situation with PDF documents. I get one PDF document for over 2.500 invoices as one file with 2.500 pages, and I need to separate every page of that document as 2.500 separate documents for each Byer and read two positions of the current page to get information about Byer. I found a lot of documentation, but there are no samples like this. If someone has an idea or experience with these PDF problems, please post it here. Thanks in advance...
  24. msd

    VCL Wrap

    Hello, I saw in one of the demo sources from DevExpress that they use TdxForm or TdxRibbonForm instead of TForm, but there are no VCL components in the DevExpress VCL list of components. In the description of the source I just need to change the class from TForm to TdxForm, and I have new properties for development and design. So, my question is: can I or how can I wrap some VCL without creating a new VCL component and adding some properties and events? Thanks in advance...
  25. Hello friends, I need some advice about Delphi as a TCP/IP server from you, Delphi developers.🙂 Scenario: I have about 25 computers with permanent connections to the TCP/IP server component. Every client has a dedicated server IP address, which is only one point in this story. Every client sent some HEX code, which I read with ReadByte on the TCP Indy Server, and according to that data, I know the clients locations and IDs. Those clients are LED displays that represent numeric data sent by a TCP/IP server. Problem: With Indy 10 and Delpi Latest, my app freezes after 1 to 3 hours of use. Only Indy can read those bytes from cache data, and the connection must be permanent. Q: Is there any VCL on the market that has TCP/IP Server-Client with these features? P.S. I tried with demo versions of DevArt Secure Bridge and Internet Component Suite, and I couldn't read bytes, only raw text. Thanks for any advice or help in advance.
×