Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 04/22/19 in all areas

  1. In my last blog post Getting the Windows version, I claimed that there is no way to get the actual version number of Windows 10 without reading the version information of the Kernel32.dll and interpreting it 1. Since then I have been told that there is actually a Registry key that contains the Windows version: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion It has several entries that can be used to get the same version info that the Winver tool displays to the user. On Windows 10 that’s: ProductName ReleaseId CurrentBuildNumber UBR On my test installation they get me “Windows 10 Pro” Version “1809” (OS Build “17762”.”437″) (The quotes denote values read from the registry.) https://blog.dummzeuch.de/2019/04/22/getting-the-windows-version-revisited/ Just to make it clear: The above text is not the full blog post.
  2. dummzeuch

    Getting the Windows version

    This was not about a video but about a blog post. But feel free to continue not reading anything I post. It's completely voluntary. I agree that most videos on programming are a waste of time. It's still my opinion that somebody who comments on a blog post should at least have read it. If you had, you would have noticed that I already mentioned RtlGetVersion and discarded it because it does not give me the information I wanted. Just in case you are interested nonetheless: I have just written another blog post crediting your hint. If you don't want to be credited with something that you apparently deem to be too trivial for your attention please let me know.
  3. timfrost

    MMX Beta 14.1 available

    Can I please say that I find the MMX user interface entirely satisfactory in daily use. This thread has reminded my about some useful features which I had forgotten about, despite many years of using the product. I would not want them removed, and since the icons take little space I would not want them hidden. There are perhaps minor features that I would improve, but they do not cause me any trouble and I appreciate that supporting the product is done as Uwe finds time to allocate to it.
  4. Uwe Raabe

    MMX Beta 14.1 available

    Funny thing is that those toolbars are originally meant for beginners. Long time users usually prefer working with keyboard shortcuts. Also f.i. filtering members by kind and visibility with the filter buttons is probably easier and faster than using the context menu. It may be pretty hard to find a balance between scaring some new user with too much possibilities and boring them with too little. I am not sure whether I prefer to answer the question "How can I hide that?" or perhaps never being asked "Can it do this or that?". There are quite a number of people saying they cannot work without MMX (me included) after working with it for a while. I know there are others who never get beyond this point. They either will miss something or MMX is not the right tool for them. You cannot please everyone.
  5. Uwe Raabe

    MMX needs new icons

    The current icons in MMX not only look a bit old, they also don't look well on the Dark Theme. They are not alpha blended and are only available in 16 x 16 pixel size. This may become a problem when the IDE will support High DPI in the future. I am planning to assign a professional icon designer to create new icons matching the icon guide lines of the Delphi IDE. The icons will be alpha blended and are provided in different sizes. They will use the color scheme and style of the IDE icons. You all know that I don't make any money with MMX. Thus I am not able to cover the cost for this endeavor from my private pockets. At least not completely. Therefore I created a MoneyPool at PayPal to collect some donations from MMX users willing and able to spare some money for this special purpose. In case you are willing to donate: Note that you won't get anything for your money (aside a better looking MMX). You cannot expect your favorite feature to be prioritized or your personal bug be fixed any sooner. I promise to spend the money for this special purpose and I will close that MoneyPool when the amount needed is reached. Also I am not looking at the hobby programmer or one man show using MMX, but I guess there are a couple of companies making some profit out of their heavy use of MMX. Perhaps they can shell out a small amount to help here.
  6. David Schwartz

    Any advice when to use FileExists?

    Historically speaking, the old DOS FAT file system was notoriously inefficient when it came to looking up filenames. The original FAT directory segments held something like 63 x 8.3 filenames and the last entry was a pointer to the next segment. Each time you ask for a file, the FAT file system would begin a linear search at the first directory segment and scan through each one to the very end of the list before it knew if it existed or not. It was always faster to get a list of files first into a memory buffer, sort it, then search that first before probing the file system. But the real solution laid in splitting things up so you didn't have more than a few directory segments anywhere. That usually led to something where you had two directory levels: one that was simply A to Z, and the next that contained folders or files that begin with that letter. Sometimes it would help a lot to go down and additional level. Also, FAT directory segments were filled from front-to-back. If a file was deleted, the slot for it would be cleared. A new filename added to a folder would take the first available slot. So putting thousands of files ('n') into a FAT-based folder would take on average O(n/2) tests for filename equality. Going from front to back probing with names, whether it was an ordered or unordered folder, would take the same amount of time. Introduction of long filenames added further delays if you used the long filenames. I'm not sure what FAT32 did to improve this, if anything. Windows introduced caching of directory segments that sped things up considerably. From what I understand, NTFS introduced something closer to what Unix does, and resolved this inefficiency somewhat, although I never did anything that pushed the limits of an NTFS-based file system the way I used to do with old FAT-based file systems. With faster CPUs and more extensive caching in Windows, the problem seemed to fade out. Part of the solution was to use FindFirst/FindNext, even if this meant you built a list in memory to search against before asking the file system for anything.
  7. Angus Robertson

    Getting the Windows version

    Yes, I see the word video in very small letters buried in a line at the top of the screen, but I read these groups backwards from Unread Content, and you never mentioned you were posting a link to a video in the root post. That would have be sufficient for me to skip this thread, even less time to watch beginners how to program videos . My apologies for wasting your time by posting something useful for other developers. Angus
  8. Yes, I agree completely. And I still don't read new EMBT forums at all: any attempt to read them produces only another paroxysm of aversion.
  9. Angus Robertson

    Getting the Windows version

    Use RtlGetVersion instead of GetVersionExW which always gives the true operating system. function RtlGetVersion (var lpVersionInformation: TOSVERSIONINFOEXW): DWORD; stdcall; // Windows 2000 and later function RtlGetVersion; external 'ntdll.dll' name 'RtlGetVersion'; OsInfo: TOSVERSIONINFOEXW; RtlGetVersion (OsInfo) Unfortunately Microsoft has not provided any APIs to read the multiple different versions of Windows 10 or Windows Server 2016, so you need to read that from the registry: HCM\Software\Microsoft\Windows NT\CurrentVersion\ReleaseId which will return 1607, 1809 or something similar. \ProductName gives Windows 10 Enterprise or similar, although you work that out from APIs. Angus
  10. Daniel

    Getting the Windows version

    Exactly. And this is what he describes in his blog.
  11. Hey, nobody forces you to use the Uses Manager. I just thought I'd mention that it can be used that way. Regarding the long time it takes to build the list: Try it again. It should be much faster after it created the initial cache.
  12. dummzeuch

    Getting the Windows version

    There is no download, instead you use subversion with the following URL: http://svn.osdn.net/svnroot/dzlib-tools/dzlib/trunk/ Alternatively you can use svn with the following URL for getting dzlib+buildtools, which includes all externals that may be used in any of the test programs or referenced in some of the units: http://svn.osdn.net/svnroot/dzlib-tools/dzlib+tools/
  13. You could also use the identifier tab of the GExperts Uses Manager. It gives you the unit name where an identifier is declared and with Ctrl+O you can even open that unit (but it does not jump to that declaration, yet)
  14. Larry Hengen

    GExperts Procedure List: Show ALL procedures in the whole project

    I think that if you focus more on code organization, you will get more benefits, than from a tool. That once in a blue moon brain fart that prevents a developer from remembering where the method is located, Grep Search works well and is lightning fast. Why paid the price to parse the whole project every time you use Gexper'ts Procedure List? Organize and document your code organization and it will become more intuitive to use IMHO.
  15. Daniel

    MMX Beta 14.1 available

    Ah grumpy Alek - it's you again ... . I knew I remember that harsh sound from somewhere. What is so hard about being constructive and positive?
  16. Stefan Glienke

    MMX Beta 14.1 available

    One of the reasons I never really got into MMX despite everyone telling me that it is a must have was its overloaded UI with all the toolbars and stuff after you installed it. Yes, you can turn off most of it but it would really pleasant if there was a simple option to switch between something like a "light" and "full" version easily (or even more different presets) - possiibly selectable during setup.
  17. David Heffernan

    Wow, first time using repeat ... until

    The C++ for loop, in its general form, is trivially translated into a while loop. So for (init; condition; iteration) statement becomes init; while (condition) { statement; iteration; } It is well worth knowing this if you are in the business of translating pieces of code. So in C++ the for loop is syntactic sugar on top of the while loop. In Delphi also the classic for loop can also be trivially expressed as a while loop. This for loop is simpler than that of C++ but it's still just a while loop (condition tested before body executed) with implicit increment. They Pascal repeat loop is like the C++ do loop. They key being that the condition is at the end of the body rather than the beginning.
  18. Not really since TLinkLabel was introduced as a standard VCL control in Delphi XE2.
  19. dummzeuch

    What does "G" in GExperts mean?

    I don't remember ever hearing how the name came to be, but since Gerald was the guy who started the tool in the 1990ies, it's likely that he named it after himself. Time to call it TExperts then... (Just kidding)
  20. David Heffernan

    Any advice when to use FileExists?

    Why are you so worried about reading from files. It's perfectly normal to open a file, read it, parse as you go, then close. In fact trying to do other than that is just going to create more complexity for you. To what benefit? What is the problem here? What do you see going wrong with the most simple way to read files? It looks like you are inventing a problem where none exists.
  21. It is pretty obvious that you do not care. You should care because this is a public forum, not just yours. Now we have told you several times to move your specific discussions about technical details of the Delphi-language to a separate thread. Most of these posts are offtopic now. You did not care at all. Do I really have to explain to you why it is important for us to stay on a topic? It is not that complicated. If any other person wants find find some information later, they will look for the thread-title to decide for reading a topic or not. This „let us talk about everything“-threads do not help anyone.
  22. David Schwartz

    Any advice when to use FileExists?

    If you're worried about the parsing taking a relatively long time, then simply create a TMemoryStream and do LoadFromFile and parse that instead
  23. David Heffernan

    Any advice when to use FileExists?

    That's not how you do exception handling. You don't need to catch and re-raise. You can just let them float up to wherever in the code knows how to deal with them with finality.
  24. Attila Kovacs

    Any advice when to use FileExists?

    completely superfluous, then for each File in MainPath do if the file can disappear between these two lines if FileExists(File) then it could also disappear between these two lines If _IsFileValidForParsing(File) then (then you decide to create the file, it could be there again) etc.. FileExists and co. are a total nonsense, then it's returning a momentary state. Put a try except around any IO and handle the last os error if apply.
×