Jump to content

dummzeuch

Members
  • Content Count

    2634
  • Joined

  • Last visited

  • Days Won

    91

Everything posted by dummzeuch

  1. dummzeuch

    while TStream_TryRead() do

    Hm, an endless loop with an obscured break is not quite what I would call elegant and easily readable. But yes, that's one way a repeat loop "would do the trick".
  2. dummzeuch

    while TStream_TryRead() do

    Care to provide an example?
  3. dummzeuch

    Project Options -> Version Info aka. dproj madness

    https://blog.dummzeuch.de/2015/09/26/using-my-buildtools/ Actually, it's even older: http://www.dummzeuch.de/delphi/dzprepbuild/englisch.html
  4. dummzeuch

    Project Options -> Version Info aka. dproj madness

    I haven't got a build server, but use the post build event in the IDE (and in command line builds) instead.
  5. dummzeuch

    Project Options -> Version Info aka. dproj madness

    Since the version info stuff never really worked very well since at least Delphi 2005, I don't use the IDE to manage the version info but create a version info resource externally and link it to the executable. As as side effect, I have no more annoying changes in the dproj file that show up in SCM with every build.
  6. dummzeuch

    Rad studio install on several machines

    If you need to do that more than once: If you have got an active subscription, I suggest to have your license converted into a Network Named User license (As far as I know that's possible any time and does not cost anything. Ask Embarcadero.). This will allow you as many installations as you like as long as the user name is the same on all installations. You'd need to run the Embarcadero License Center on the network though, but that can also be a virtual machine. I blogged about that a while ago. If it's only this one time: The License used to be bound to the computer name (I think that's still the case) and you could copy the contents of the directory C:\ProgramData\Embarcadero to the new machine (But again: You have to use the same computer name for this to work, which is only possible if only one computer with that name is on the Network at any time.) If that doesn't work, try a new online activation. If that doesn't work because you have already reached the maximum number of possible installations (2!) the you need to contact Embarcadero sales to bump the number of activations for you.
  7. I'm sure everybody else noticed that a bot has started to spam this forum using several accounts. The motive behind this is trying to promote fake airline phone numbers for scamming people. And apparently nobody who can do something about it, has so far noticed.
  8. Delphi has for a while contained two classes that simplify stream compression: TZCompressionStream TZDecompressionStream I had not used them before and when I tried to use them now to compress and decompress some binary data that is stored as part of a large file, I got some inexplicable results. So I wrote this little test program to find the problem. Read on in the blog post.
  9. What kind of application are we talking here? VCL? FMX? Console? That you get a runtime error rather than an exception hints at something going wrong before an exception handler is active.
  10. Since as the last step he does an actual comparison between the input string and the string "found" by the hash function(*1), it should work with any input string. The important part is that the strings he is searching for are known beforehand, so he can fine tune the hash function. (*1: At least he was still doing that when I stopped watching at about 3/4 of the video.)
  11. I am trying to convert an import lib file for a dll meant for Visual Studio (therefore in COFF format) to OMF format to be used in C++ Builder: c:\Program Files\somecompany\cpp\lib32\Debug>coff2omf -lib:ms libraryname.lib c:\sources\libs\libraryname.lib coff2omf takes a few seconds does not output any error messages but does not create any output file. If I add the -v option, it will output lots of symbol names, but still create no output file. The input file is readonly but the output directory is writable. What am I missing this time? I'm beginning to suspect I should have used Visual Studio rather than C++ Builder, but we don't have a license for that. Does anybody have any experience with Embarcadero Dev C++ ?
  12. Some of these computers have access to the same servers, but many don't, so a network share is out. Hm, yes, version control would probably work. Never thought of that.
  13. The repository is one of the many ancient but mostly unknown features of the IDE. Thanks for reminding me. It can also store frequently used preconfigured components (e.g. an Ok button) and even component groups (e.g. an Ok plus a Cancel button), that can then be easily accessed through the component palette. Unfortunately I have so many different installations on various computers, that every time I remember using that feature, the template is on a different computer. But I guess that's rare.
  14. dummzeuch

    How do I upgrade an old 2007 project ?

    If automatically updating the project (by loading it into the Delphi 10.3 IDE) fails, your best bet is to create a new VCL project and add all units from the original project to it. Then copy all the settings (especially the search path) from the Delphi 2007 project to the new project and fix any problems afterwards. Make sure you retain a copy of the original project so you can always look up any settings. I hope yon still have got Delph 2007 around? Otherwise it might be a bit inconvenient. You do have updated versions of all your 3rd party components or at least their source code, do you? Otherwise you are out of luck. Note that in Delphi 2007 there was no such thing as a base configuration but only one configuration for Debug and one for Release builds. You might want to figure out which settings you want to move to the base configuration an which ones to keep in Debug / Release configurations. Another option, if feasible, might be to upgrade the project through several intermediate Delphi versions since they usually can work well with projects from their immediate predecessor. That would of course require installations of several intermediate Delphi versions, which I don't know if you have them.
  15. Just in case we are not the only ones still using Samba with an NT domain: Windows Update KB5028166 which will automatically be installed on Windows 10 today, breaks compatibility with that domain type. After the installation, a login with a domain account no longer works. Removing that update fixes the issue, but of course that’s no permanent solution.
  16. I wonder whether the Unit Dependency graph in PasDoc or the Project Dependencies expert in GExperts might be of any help here. They both contain the required information, but possibly not in a helpful format. Maybe they could be improved to become more helpful.
  17. There is already a patch to fix the issue. Thanks a lot @StefanMetzmacher
  18. It has reached the Samba mailing list and there is a bug report for it. If understand it correctly, Microsoft did not document the changed behaviour beforehand, as apparently they promised they would. (Microsoft was actually contributing to Samba for a while, not sure about that recently.)
  19. Yes, we should have been updating it years ago. As I said, there are reasons. But I won't discuss them here. The point simply is that it stopped working due to an update that was forced on us without a warning (at least not one I noticed). I have been spending several hours already to uninstall and block this update so my colleagues can finally get their work done. Large companies and home users will most likely never notice because even home users who use SMBv1 will most likely not use an NT domain and accessing a stand alone Samba server still works.
  20. I'm not alone and it's spreading: After update KB5028166 trust relationship broken. KB5028166 update. computers are unable to join the domain. So there is hope that somebody figures out a fix or a workaround. In the meantime nearly 20 of our computers were affected. My warning not to install this update came to late for several of my colleagues.
  21. That problem consistently occurred on all our computers when that update was installed (5 so far, 2 of those VMs) and disappeared when I uninstalled it. And I'm not the only one who has that problem. No idea why it works for you.
  22. I guess going back to the feature set of Turbo Pascal 3 would also improve the stability of the IDE and the compile speed [/sarcasm]
  23. dummzeuch

    Delphi SQL Formatter

    There is the "Convert Strings", editor expert which allows for more complex conversions.
  24. dummzeuch

    converting float to text

    I'm mostly a Delphi programmer, I have no experience with C++ (or Java or C#) and only used C many (>20) years ago, so please forgive me if I ask stupid questions. I am currently struggling to write some C++ code to use a 3rd party library that's written in C++. Given a buffer pointed to by zMap containing float values, how do I convert these values to strings? I know that these values are between 1 and 3 with the odd inf sprinkled in, because I have dumped the memory to a file and read it in Delphi as Single. (And also because these values are supposed to be a distance in that range.) This is what I tried to output the first value: float* zMap = SomeFunctionThatReturnsABuffer(); char buffer[100]; snprintf(buffer, sizeof(buffer), "%f", *zMap); cout << buffer << " " << endl; I got a large number (>1000), even though I know that the values are between 1 and 3. If I use the same code on an array like this: float Arr[3] = {1.1, 2.1, 2.5}; float* Ptr = Arr; char buffer[100]; snprintf(buffer, sizeof(buffer), "%f", *Ptr); cout << buffer << " " << endl; It works as expected. What am I missing here?
×