Jump to content

aehimself

Members
  • Content Count

    1030
  • Joined

  • Last visited

  • Days Won

    22

Posts posted by aehimself


  1. So back to the original topic I went ahead and created the two packages based on the article @dummzeuch shared. I coped everything from the original package to this, changed the platform to Win64 and moved the parts what caused the compilation to fail to the design time package (Only design time editors and registration procedures). It worked 🙂

     

    I was finally able to build 64 bit DCUs but then I realized that my design time package contains only ~4-5 of the 20 components. A quick search showed that there are still at least 40 files with RegisterComponents call in my new runtime package, but it still compiles... is this normal? 🙂


  2. 10 hours ago, David Schwartz said:

    I don't get this at all. I've got a Mac Mini and MacBook Pro from 2014 with only SSD and thousands of hours of use, and have had no problem with either one. 

    The best way to prolong the life of your equipment is to not use it. Next to that, drive it until it dies, then replace it. Fortunately or unfortunately, Apple's hardware seem to last a very long time. (I did have to get the base of my MBP replaced because the battery started bloating up; they salvaged the main board and top cover and display, but replaced the rest of the base including the keyboard.)

    * Sigh *


  3. I like to compile my components and let Delphi use the existing DCUs in my projects. Having my sources on SSD this not just saves time but prolongs the life of the data store as well.

    I recently started to experiment with a component suite which was written as a blob, runtime and design time in one, therefore I can not build 64 bit DCUs.

     

    I never really thought of creating my own component packages and therefore I have 0 experience with this. Are there any tips, tricks or resources that can help me achieving my goal? At the moment I can't even tell how to distinguish what is considered runtime and what is designtime 🙂


  4. 22 hours ago, jonnyg said:

    Mike Shkolnik at scalabium.com has a freeware dbGrid.

    As I recall, it's part of a larger freeware component package

    Today I switched my search engine and found SMComponents. I have to do some extensive testing to see what I have to add or fine tune but holy sh*t this DB grid looks promising!

    I'll play around with it for a while and then try to build 64 bit packages out of it.


  5. Hello,

     

    A while ago I started to patch up the dumb TDBGrid component shipped with Delphi. Added some things, fixed some things and now I face an issue where the bottom-right square where the two scrollbars meet flickers white for a moment in some occasions (using a dark theme). I think I know where the bug is but to be honest at this point I'm thinking on abandoning my creation and using something else what someone made, who knows more about this stuff I do.

    I am willing to spend the same amount of money on a program I earn from it but I use DBGrid in a free tool... so my budget is kinda... tight 🙂

     

    Worst case scenario I'll patch on my ocean of patches until a new one arises. I'm just curious if anyone is using a decent component (or suite) which I can experiment with?

     

    I already tried KControls and JVCL.

     

    Thanks!


  6. @Dany Marmur as far as I can see @EgonHugeist already started the development of the Zeos-based memory table.

    The latest snapshot already has the TZMemTable component - now it's time to start to play with it!

     

    Edit: Seems to be working as it should:

    procedure TForm1.FormCreate(Sender: TObject);
    begin
     ZMemTable1.FieldDefs.Add('MyField', ftWideString);
     ZMemTable1.Open;
     Try
      ShowMessage(ZMemTable1.RecordCount.ToString);
      ZMemTable1.Append;
      ZMemTable1.FieldByName('MyField').AsString := 'Hello world!';
      ZMemTable1.Post;
      ShowMessage(ZMemTable1.RecordCount.ToString + sLineBreak +
                  ZMemTable1.FieldByName('MyField').AsString);
     Finally
      ZMemTable1.Close;
     End;
    end;

    At the moment it throws a nullpointer AV if it's destroyed while it's open but I'll send a pull request with a fix in a minute.

    • Like 3

  7. There are 2 things you have to keep in mind:

    1, IV, as @Kas Ob. pointed out. You must find out what IV your PHP encryption is using (if any). Afaik, DCPCrypt will use the part of the key as an IV, if not given any but I might be wrong here.

    2, Character encoding. Delphi 7 is ANSI, and a web interface is usually UTF-8. So you take an UTF-8 string, encrypt and Base64 it. If you unbase64 and decrypt it you still have to do an encoding conversion, otherwise the result will be not a valid string for Delphi.

     

    What I advise at first: check the raw text and the encrypted binary (before Base64-ing it) with a hex viewer. Then, check the received binary (after unbase64ing it) and the uncompressed "text" with a hex viewer; that can already give you a hint.

     

    I personally abandoned the EncryptString / DecriptString a long time ago. I'm converting strings to TBytes (Array Of Byte) and performing the encryption on the binary data.

     

    Edit: I was wrong about using the key as IV. It just generates one for itself:

    procedure TDCP_blockcipher64.Init(const Key; Size: longword; InitVector: pointer);
    begin
      inherited Init(Key,Size,InitVector);
      InitKey(Key,Size);
      if InitVector= nil then
      begin
        FillChar(IV,8,{$IFDEF DCP1COMPAT}$FF{$ELSE}0{$ENDIF});
        EncryptECB(IV,IV);
        Reset;
      end
      else
      begin
        Move(InitVector^,IV,8);
        Reset;
      end;
    end;

     


  8. Hello,

     

    I know that madshi has it's own support forum, I'm mainly looking for personal experiences. We have a large Delphi application with MadExcept purchased and integrated already. When I put the line "StartLeakChecking;" in this project, random nullpointer access violations start to happen... for example at TSpeedButtom.Glyph.Assign, because TSpeedButton.Glyph is nil. Errors do not appear without StartLeakChecking, with ReportMemoryLeaksOnShutdown := True or when debugging via DeLeaker.

    I am also aware that the main purpose of MadCollection is not to detect memory leaks, it's just something added as an extra.

     

    So my question is... should I stop trying and just accept that this function is flawed? Do you guys have personal experience with MadCollection's memory leak detection in large projects? Has anyone seen these random AVs too?

     

    Thanks!


  9. I am using 10.4 and I used the built-in; and also made my own DB grid inherited from the built-in one. All works like a charm.

    Does your Delphi say it doesn't know what TDBGrid is or cannot find the Vcl.DBGrids unit?

     

    Anyway, doublecheck the library locations / just start with a fresh registry (bds -r temp) to see if the issue is with the installation or your settings.


  10. Tbh, in majority of the cases removing the HKCU Embarcadero registry tree and the general Delphi folders (C:\ProgramData\Embarcadero, %USERPROFILE%\Documents\Embarcadero) is sufficient for a clean start.

    You just have to be careful if you have multiple Delphi installations.

     

    I myself is going to have to do this at work soon as most of my toolbar buttons stopped functioning after a Windows update...


  11. 1 hour ago, mtjmohr said:

    Due to you help, dear friends, I have been successfully able to create both x86- and x64-applications under the original scheme (EXE and DLL) - I have taken the latest source code I could find, associated the files to each other which, version-wise, belonged to one another, and compiled them.

     

    There have been some string warnings so far, but none of them hindered compiling. The port is detected correctly, and data can be transferred using the "HL7Sender" test program (I will show you a screenshot in a minute).

    Congratulations! Now you can re-think, restructure and modernize your code if you wish (what I strongly advise if you'd like to run it as a service, btw).

     

    1 hour ago, mtjmohr said:

    Generating a md5 hash to identify the authenticity of my software - how can I do this? By using an external tool?

    Since you are already using DCPCrypt, you can use TDCP_MD5 for this purpose. Question is what you want to achieve? Self-diagnosis?

     

    1 hour ago, mtjmohr said:

    Does it make any sense to compress the EXE using EXE obfuscator or security tools such as UPX or ASPack?

    I don't know about ASPack, but UPX is NOT an obfuscator. It's a compressor. An executable you compress with it can be uncompressed to it's original form in a fraction of a second (to be precise - that is exactly what a packed .EXE does)

     

    1 hour ago, mtjmohr said:

    Does it make sense to have the software provided with a registration or licence key?

    That is something what you have to know. Proper licensing is really complex and a never ending cat-and-mouse game. On the other hand, you'll earn your daily bread.


  12. So the layout is somewhat like this:

     

    image.thumb.png.329f981cbd06197cd7f21f76ac22c59e.png

     

    Since I got lost somewhere, I'll start from the beginning. Do you have a FUNCTIONAL issue with the application now (meaning, not the warnings in the source but something not working / not working properly)? If yes, where?

    A bit off-topic: is there any particular reason why the packet verification resides in a DLL? If no other application is using it I feel like it only adds unnecessary complexity and points of failure (see one of my first replies about allocations).


  13. Let's take one step at a time. String conversions (AnsiString vs. String) will only matter in data transfer / storage but as far as I understand, you can not even connect with your application. Is that right?

     

    I'm a bit confused. You said that TCP port 3000 is listening by your Python script...? Shouldn't your application be listening there (that's what TServerSocket does; it listens and accepts client connections)?

    Can you share some basic layout of your application? What is running where, what should connect where, etc.


  14. 1 hour ago, mtjmohr said:

    In other words: I cannot establish a connection between the sender and the new "HL7 Collector Socket" which means that this program does still have problem handling the port opening and closing or the acceptance of messages, either way is a problem.

    Start your program. Click on Start, type cmd, press enter. In the appearing window, type

    netstat -ano | find /i ":3000"

    press enter. Anything shows up?

     

    We are still talking about the standard VCL application, right?


  15. 3 minutes ago, Kas Ob. said:

    I think that is wrong !

     

    May be someone with better knowledge with DCPCrypt can help here, i never used it, amd you don't need to compile that package in 64bit, neither it does need an install, that for design time part only.

    The question is does your source of DCPCrypt support 64bit, this https://github.com/Dunhamb4a/DcPCryptV2 looks like it does.

     

    I personally use DCPCrypt and it indeed works on 64 bit applications. I compile the 64 bit DCUs, the 32 bit DCUs and install with a 32-bit debug flavor.

    For IDE instalation though, you MUST select 32 bit, as the IDE is 32 bit only and therefore you cannot install a 64 bit component.


  16. 4 minutes ago, mtjmohr said:

    Before I come back again to the Windows Service aspect, may I ask another question?

    On the screenshot you can see that I receive the same error message (when saving or compiling) for "DCP_3des1" and - not displayed - "DCP_sha11". These two whatsoevers belong to "DCPcrypt" and are to be found as *.pas files in their respective directories.

    How shall I handle this?

    Issue here for me is that I do not find them in the Palette ...

    You have to install the DCP components to Delphi so they show up on the palette and can be used on forms.

    If you have the .pas files, you can use them, but only runtime.


  17. 1 hour ago, FPiette said:

    The way to design that is to move all the code to a new class without any GUI interaction. This class could be a TDataModule to have GUI design.

    That class will interact with the GUI or the service thru methods, properties and events.

    Anyway, this is how a good application is always designed! It is a good advice to always separated the user interface from the actual code doing something.

    This is exactly how I am designing my service applications lately. I was talking about the current situation, where OP already has code on the form itself, not very comfortable with Delphi as a language and does not want to refactor - only to get it to work.

    Without a huge refactor you can not push the existing code to it's own class - you have to have your own message pump and a worker thread to run that message pump as a minimum (ClientSocket and ServerSocket both needs messages to operate).

     

    Yes, it is the elegant solution - write your code once, run it everywhere. This is the quick and dirty solution, which can be done without much proficiency.


  18. Just now, mtjmohr said:

    If I want to compile also a 64-bit version, is there a general tip for me as to what to look for regarding "compile parameters" or can I simply change the compiler directive to 64-bit?

    Normally, changing the target platform is enough, but be careful to compile your DLL as 64 bit too! A 64 bit application cannot use a 32 bit DLL.

     

    2 minutes ago, mtjmohr said:

    I want to bring this "application" into a Windows service. Is there a standard procedure for handling this? Have you got some instructions where I might learn that from?

    That is unfortunately a different type of application. Now you created a "Windows VCL Application" and what you need it a "Windows service":

     

    image.thumb.png.85019f62882ec55361e193820bd0d740.png

     

    You don't really have a choice than to create a new one and start copying your code. You also can try to "import" this form in the service application, and create an instance of it... it MIGHT work.

    But be aware, debugging a service application is usually a lot harder. You might want to implement proper logging for that.


  19. Just now, mtjmohr said:

    Okay, I had integrated the "dclsocket260.bpl" for RAD Studio 10.3.3 even before but never came to the idea of dropping the component icon onto the form.

     

    Can you please tell me how to do that, i. e. where the palette is from which I can take them for dropping them?

    Make sure your form is visible in the IDE (you are not viewing the source). Press Ctrl-Alt-P, start typing "ServerSocket" and then press Enter.

×