Jump to content

Bill Meyer

Members
  • Content Count

    655
  • Joined

  • Last visited

  • Days Won

    12

Posts posted by Bill Meyer


  1. 1 minute ago, Mike Torrettinni said:

    I know I can use System.TypInfo.GetEnumName but then I'm limited to the actual enum names instead of custom strings. Right?

    That's correct. The question is what problem are you trying to solve? What is your purpose? I use a record helper to implement a two way conversion, string to enum, enum to string. The string forms are used in persisting values to a database. 

    If you need custom strings, then you will incur a maintenance issue, one way or another. As I mentioned earlier, if different languages are a factor, then you may need a multi-dimensional array of string constants.

    • Thanks 1

  2. 1 hour ago, Mike Torrettinni said:

    Correct, compiler message that complains.. not sure which message that would be, but any alert that would show me all the code that is using this enum in a way that is not compatible anymore with new size of enum.

    The const is not good, values are dynamic.

    I have need of values that can be persisted to a DB, so am now using RTTI to let me save the enum members by name, not their ordinal values. That frees me from any dependence on order or number. I don't know of any way to directly achieve what you want. 


  3. On 4/15/2019 at 7:26 AM, Tom Mueller said:

    I encountered one problem for projects with FastReport. 

    FastReport writes the main component TFrxReport into the pas file - all sub-components are only stored inside the dfm without a reference in the pas file.

    Unfortunately our projects use a lot of FastReport and therefore a compilation with your generated special unit is not possible.

    Same is true with ReportBuilder, as I just discovered. I have emailed Andreas, and hope to hear something from him.


  4. On 6/29/2021 at 4:21 AM, Vandrovnik said:

    "If your PC doesn’t have a TPM capability then Windows 11 will be the falling rock which wipes out your beloved dinosaur hardware. "

    Many motherboards, such as the Ryzen mobo I am using, have a header for an installable TPM 2.0 module. And as it's only about 18 months old, I would not characterize it as a dinosaur.


  5. 1 hour ago, Lars Fosdal said:

    There is still a lot of FUD about Windows 11 requirements. 

    And some folks are no doubt less than amused to find that they bought an MS Surface in the last two years that is reportedly not compatible.

     

    I haven't seen anything compelling yet, and have seen a number of things which I find undesirable.


  6. 1 minute ago, timfrost said:

    If you right-click the EXE and select Properties/Compatibility, is 'Run as administrator' checked?  This setting would survive rebuilding and would also be unique to your own VM where it is running, as well as independent of the manifest it contains.

    As I mentioned above, I have run normally as well as elevated (Administrator), and although 'Run as Administrator' allows me to work, it is abnormal, and not the desired mode of operation.


  7. I will try to clear up the issues which I failed to adequately explain in my original post. The complete report from MadExcept is here: https://pastebin.com/rS7vn8Tc

    1. Everything in my note is based on the content of the VM. The IDE is there, and when I run independent of the IDE, the app is also running in the VM.
    2. Running the IDE normally, the error I get is this: 
     image.png.8f6e3d8440b73ef9d3bedc4dba7cb210.png
      That error occurs before I reach the first line in the DPR.
    3. Running the IDE elevated,  there is no error.
    4. We use a manifest, and it does NOT specify elevation in privileges.
    5. I said the application "demands" elevation because without elevation, I cannot get to any part of the application code in debug mode. Oh, and running in the IDE without debugging fails in exactly the same way.
    6. RDP is not involved; I am running the VM on my local machine.
    7. The project has been migrated from D2007, though some files also came from XE7. Migratory work was completed months ago. We are now in debug and functional rework.
    8. I created the VM and did the initial work migrating components and application code. The VM has been in use for 10+ months with no issue of this sort until two days ago.
    9. As I mentioned in my original post, reverting to code from last Friday does not alter the behavior. Neither does code from two weeks ago. So again, the behavior is contained in the VM image in some way, but is independent of application code.
    10. I am the only developer experiencing the elevation error. My colleagues do not get the error.
     

    I do appreciate the thoughtful suggestions and the insights into security in Windows. However, from Friday afternoon to Monday morning, something changed which created the need for elevation. No files were added or altered in that interval. I have pored over settings to no avail, and am at a loss to imagine what Delphi option, either global or project level, could create this issue, or why.

     

    At this point, I am wondering about the registry, about security policies (none of which I have altered), and beyond those thoughts, I am out of ideas, other than to build a new VM from scratch.


  8. I am working on a large project in Delphi 10.2. Friday all was well. Yesterday morning, I found that I could not run the app in the IDE but received a message that a process needed to be elevated.

    I have checked settings everywhere, I think. I've reverted to code from last Thursday, and the problem persists. However, the issue, whatever it is, is in the VM, as I carried this VM from my home machine to the office, and I see the problem here, as well.

    EurekaLog makes no report if it. I tried MadExcept, which is not my usual too, and it does report, but what it is telling me is not obvious to me. The most meaningful content in the fairly long report appears to be this:
    disassembling:
    [...]
    203b5baa         call    -$548a7 ($20361308)    ; System.LoadResString (dbkdebugide250.bpl)
    203b5baa
    203b5baf         mov     eax, [ebp-$64]
    203b5bb2         push    eax
    203b5bb3         mov     eax, [ebp+$20]
    203b5bb6         mov     [ebp-$5c], eax
    203b5bb9         mov     byte ptr [ebp-$58], $11
    203b5bbd         lea     edx, [ebp-$5c]
    203b5bc0         xor     ecx, ecx
    203b5bc2         pop     eax
    203b5bc3         call    -$52938 ($20363290)    ; Winapi.PsAPI.System.SysUtils.Format (dbkdebugide250.bpl)
    203b5bc3
    203b5bc8       loc_203b5bc8:
    203b5bc8 05481   mov     ecx, [ebp-4]
    203b5bcb         mov     dl, 1
    203b5bcd         mov     eax, [$203687f0]       ; Dbkhelper.EDbkError.Create (dbkdebugide250.bpl)
    203b5bd2         call    -$5291f ($203632b8)    ; Winapi.PsAPI.System.SysUtils.Exception.Create (dbkdebugide250.bpl)
    203b5bd2
    203b5bd7         call    -$54af4 ($203610e8)    ; System.@RaiseExcept (dbkdebugide250.bpl)
    203b5bd7
    203b5bdc       loc_203b5bdc:
    203b5bdc 05483 > mov     eax, ebx
    203b5bde         call    -$4d067 ($20368b7c)    ; Dbkhelper.CheckRetVal (dbkdebugide250.bpl)
    203b5bde
    203b5be3 05484   xor     eax, eax
    203b5be5         pop     edx
    203b5be6         pop     ecx
    203b5be7         pop     ecx
    203b5be8         mov     fs:[eax], edx
    203b5beb         push    $203b5c64
    203b5bf0         lea     eax, [ebp-$64]
    203b5bf3         mov     edx, 2
    203b5bf8         call    -$54acd ($20361130)    ; System.@UStrArrayClr (dbkdebugide250.bpl)
    203b5bf8
    203b5bfd         lea     eax, [ebp-$54]
    203b5c00         call    -$5496d ($20361298)    ; System.@IntfClear (dbkdebugide250.bpl)
    203b5c00
    203b5c05         lea     eax, [ebp-$50]
    203b5c08         call    -$54aed ($20361120)    ; System.@UStrClr (dbkdebugide250.bpl)
    203b5c08
    203b5c0d         lea     eax, [ebp-$4c]
    [...]

    If I run Delphi as Administrator, it all works. If I run the executable outside the IDE, it works without complaint. So the complaint seems to me to be related to the debugger, but I have not been able to discover what might affect it.

    Would appreciate any insights.


  9. 1 hour ago, Mike Torrettinni said:

    That make sense, perhaps I will do he same thing. At least some filtering results per unit and type of result.

    Your other alternative is to roll your own with DelphiAST. But there is a lot involved, since it only processes a single unit at a time. Then you have to harvest the items of interest, put them into datasets or something, and repeat for all the other units.


  10. 21 minutes ago, Mike Torrettinni said:

    Thanks, I have a full version but the report is for the whole project and not limited in scope from the main form. Great tool, but hard to pin point specifics when results are for the full project.

     

    Was hoping for some more specific tool/way to achieve this.

    I have found it necessary to write small apps to derive what I need from reports out of PAL. The noise level is quite high, and the options do not address things I have needed.

    • Like 1

  11. 55 minutes ago, Uwe Raabe said:

    On the other hand you might not even be interested in analyzing these units as you probably have no means to change any of these dependencies then shown. Usually it would only clutter the output.

    Figured it was likely to be something of that sort, but better to know than to guess. Thanks!


  12. I have been using Vivaldi as my primary browser for many months. Today, however, when I attempt login, it reports "something went wrong" and though I appear to be logged in, I see no content at all.

    Tried in MS Edge, and it works fine. 

    Worked fine in Vivaldi yesterday. 

     

    UPDATE: This turns out to have been a Windows issue of some sort. Feel free to delete.

×