-
Content Count
3483 -
Joined
-
Last visited
-
Days Won
114
Everything posted by Lars Fosdal
-
Well, every other piece of hardware is virtual in a VM, so why not the TPM?
-
Both AWS and Windows Server Hyper-V VMs can have virtualized TPMs. I would expect VMWare and others to go the same way. I am curious towards what you would need to do to move a VM from one workstation to another if it relies on a physical TPM. Perhaps an export/import thing? BTW: Currently, Generation 8 of Intel is the CPU cutoff point. For anything older than that, Windows 10 21H2 will be available and patched until 2025. https://www.theverge.com/2021/6/25/22550376/microsoft-windows-11-tpm-chips-requirement-security
-
Using Attributes in class declarations
Lars Fosdal replied to Lars Fosdal's topic in RTL and Delphi Object Pascal
I am pretty sure that the syntax of attributes won't change, so that discussion is not really interesting. Your suggested helper separates the attributes from the field/property declarations, which is not a good thing, IMO. As for cross platform - there would be two means of managing that. Defines around the attributes, or ensuring that values are appropriately scaled in the TGridView class (See last paragraphs). The attributes are just the means to change a default. I can (and do) change attributes of the fields in a Create method as well. I would have loved to be able to set all these from attributes as well, but the compiler won't allow it. If we had lambda expressions and the compiler would accept complex constants as arguments, I'd move of this to attributes. constructor TSiteGridSet.Create; begin inherited; LocationNo.Title := titles.LocationNo; GlobalLocId.Title := titles.GlobalLocId; Name.Title := titles.Name; Environment.Title := titles.Environment; Role.Title := titles.Role; AppServer.Title := titles.AppServer; LocationType.Title := titles.LocationType; DBInfo.Title := titles.DBInfo; BuildName.Title := titles.LocationType; LocationBuildTrack.Title := xlt.Create('Build'); LocationBuildTrack.Formatter := function (const aValue: TPSDLocationBuildTrack): string begin case aValue of lbtDefault, lbtLive : Result := 'Live'; lbtPilot : Result := 'Pilot'; lbtTrunk : Result := 'Trunk'; else Result := ''; end; end; RowStyler := HighlightOffline; Environment.SecondaryKeys := [LocationType, Role, Name]; Environment.Formatter := function(const aValue: TPSDEnviroment):String begin Result := aValue.ToString end; Name.ColumnStyler := Self.ServerNameColor; Role.SecondaryKeys := [LocationType, Environment, Name]; Role.Formatter := function(const aValue: TPSDServerRole):String begin Result := aValue.ToString; end; Role.CellStyler := ServerRoleColor; LocationType.SecondaryKeys := [Environment, Role, Name]; LocationType.Formatter := function(const aValue: TPSDLocationType):String begin Result := aValue.ToString; end; Param.OwnsReference := True; FComboLayout := Layout.AddLayout(xlt.Create('Combo'), [LocationNo, Name, Environment, LocationBuildTrack, Role, GlobalLocId]); end; FYI - the TGridSet is non-visual. There is a TGridView proxy class that takes a TGridSet and applies the visual stuff to the actual grid. TSiteQueryGrid = class(TGridViewPSD<TPSDLocation, TSiteGridSet>); Currently, the TGridView was written to only support TMS TAdvStringGrid, but could be refactored into a multiplatform/multigrid adapter. -
I split the Attribute discussion into a separat thread
-
Using Attributes in class declarations
Lars Fosdal replied to Lars Fosdal's topic in RTL and Delphi Object Pascal
They are far from perfect. They don't support generics, nor can you send a structured constant as an argument, even with if they were declared as {$WRITEABLECONST OFF}. For my grids wrappers, I have a load of them... type TGridSetAttribute = class abstract(TCustomAttribute); /// <summary> Disable automatic field creating for GridSet </summary> GridManuallyCreateFieldsAttribute = class(TGridSetAttribute); /// <summary> Allow MultiSelect in Grid</summary> GridMultiSelectAttribute = class(TGridSetAttribute) MultiSelect: Boolean; constructor Create; overload; constructor Create(DoMultiSelect:Boolean); overload; end; GridMultiLineCellsAttribute = class(TGridSetAttribute) MultiLineCells: Boolean; constructor Create; overload; constructor Create(DoMultiLineCells:Boolean); overload; end; /// <summary> Autosize entire grid </summary> GridAutoSizeAttribute = class(TGridSetAttribute) AutoSizeEnabled: Boolean; constructor Create; overload; constructor Create(DoAutoSize:Boolean); overload; end; /// <summary> Turn on filters for grid </summary> GridShowFiltersAttribute = class(TGridSetAttribute) ShowFilters: Boolean; constructor Create; overload; constructor Create(DoShowFilters:Boolean); overload; end; GridEditModeAttribute = class(TGridSetAttribute) EditMode: Boolean; constructor Create; overload; constructor Create(DoEditMode:Boolean); overload; end; /// ----------------- Field attributes ----------------- TQueryFieldAttribute = class(TCustomAttribute) constructor Create; virtual; end; /// <summary> Allow MultiSelect in Grid</summary> CheckBoxAttribute = class(TQueryFieldAttribute); /// <summary> Text to show as hint for column header </summary> HeaderHintAttribute = class(TQueryFieldAttribute) Hint: xlt; constructor Create; overload; override; constructor Create(const aHint: string); reintroduce; overload; constructor Create(const aHint: xlt); reintroduce; overload; end; /// <summary> Mark field as UniqueField </summary> UniqueFieldAttribute = class(TQueryFieldAttribute); /// <summary> Read-Only field attribute </summary> ReadOnlyFieldAttribute = class(TQueryFieldAttribute) ReadOnly: Boolean; constructor Create; overload; override; constructor Create(const IsReadOnly: Boolean); reintroduce; overload; end; /// <summary> Mark field as hidden </summary> HiddenFieldAttribute = class(TQueryFieldAttribute) WhenBlank: boolean; //Hides columns if all the data is empty string og 0 constructor Create; overload; override; constructor Create(const aWhenBlank: Boolean); reintroduce; overload; end; InternalFieldAttribute = class(TQueryFieldAttribute); /// <summary> Enable filtering for column </summary> DontFilterFieldAttribute = class(TQueryFieldAttribute) constructor Create; override; end; /// <summary> Custom Field - populate in DoAfterConvert </summary> CustomFieldAttribute = class(TQueryFieldAttribute); /// <summary> Toggle visibility of hidden field</summary> ToggleFieldAttribute = class(TQueryFieldAttribute); /// <summary> Grouping column </summary> GroupingAttribute = class(TQueryFieldAttribute) Priority: Integer; constructor Create; overload; override; constructor Create(const aPriority: Integer); reintroduce; overload; end; UseFieldAsCategoryAttribute = class(TQueryFieldAttribute); /// <summary> Category Name for GridEdit </summary> CategoryAttribute = class(TQueryFieldAttribute) Name: string; Priority: Integer; constructor Create; overload; override; constructor Create(const aName: string; const aPriority: Integer = MaxInt); reintroduce; overload; end; /// <summary> Autosize field </summary> AutoSizeAttribute = class(TQueryFieldAttribute) AutoSizeEnabled: Boolean; MinSize: Integer; MaxSize: Integer; constructor Create; overload; override; constructor Create(DoAutoSize:Boolean); reintroduce; overload; constructor Create(aMinSize, aMaxSize: Integer); reintroduce; overload; end; /// <summary> Set OwnsReference to true for field:TFieldReference<T> instance </summary> OwnsReferenceAttribute = class(TQueryFieldAttribute); /// <summary> Mark field as using WordWrap </summary> WordWrapAttribute = class(TQueryFieldAttribute) public WordWrap: TFieldWordWrap; constructor Create; overload; override; constructor Create(const aWordWrap: TFieldWordWrap); reintroduce; overload; end; /// <summary> Mark field as using WordWrap </summary> NoWordWrapAttribute = class(WordWrapAttribute) public constructor Create; override; end; /// <summary> Mark field as default sort-by column </summary> DefaultSortFieldAttribute = class(TQueryFieldAttribute) public SortDescending: Boolean; constructor Create; overload; override; constructor Create(const aSortDescending: Boolean); reintroduce; overload; end; /// <summary> [InitField(64 {, alignment})] <br/> /// [InitField('Title', 64 {, alignment})] <br/> /// [InitField('Title', 'Name Override for SQL', 64 {, alignment})]</summary> InitFieldAttribute = class(TQueryFieldAttribute) Here is an example of how I use them for what I call a GridSet. I have a large number of grids that uses gridsets instead of having visual form designed grids. type TSiteGridSet = class(TGridSet<TPSDLocation>) public [GridShowFilters, GridAutoSize] [CustomField] Ticked: TFieldCheckBox; [InitField(40), UniqueField] GlobalLocId: TFieldInteger; [InitField(50, hcRightJustify )] LocationNo: TFieldString; [InitField(110)] Name: TFieldString; [InitField(70), DefaultSortField] Environment: TFieldEnum<TPSDEnviroment>; [InitField(70)] Role: TFieldEnum<TPSDServerRole>; [InitField(70)] LocationBuildTrack: TFieldEnum<TPSDLocationBuildTrack>; [InitField(70), HiddenField] BuildName: TFieldString; [InitField(70)] AppServer: TFieldString; [InitField(70)] LocationType: TFieldEnum<TPSDLocationType>; [InitField(300)] DBInfo: TFieldString; [InitField(300)] DBHostName: TFieldString; [HiddenField] Param: TFieldReference<TPSDCreateParameters>; -
aka.ms is about a decade old, I think 🙂 That is an interesting conundrum with the Parallels VM and the TPM. The whole point of a VM is that is is portable.
-
How do I check for empty rows in a string grid?
Lars Fosdal replied to PrimeMinister's topic in General Help
I use wrappers that fill my grids, and I clear the grid and set up the grid size before I start loading data.- 7 replies
-
- delphi
- stringgrid
-
(and 3 more)
Tagged with:
-
Who knows... Oddly, Windows Product Name still says Windows 10 Pro
-
The current Windows 11 build shows (among lots of other values) PS C:\Windows\System32> get-computerinfo | format-list WindowsBuildLabEx : 22000.1.amd64fre.co_release.210604-1628 WindowsCurrentVersion : 6.3 WindowsEditionId : Professional WindowsInstallationType : Client WindowsProductName : Windows 10 Pro WindowsVersion : 2009 WindowsUBR : 51 OsName : Microsoft Windows 11 Pro OsType : WINNT OsOperatingSystemSKU : 48 OsVersion : 10.0.22000 OsCSDVersion : OsBuildNumber : 22000 OsHotFixes : {KB5004034, KB5004567, KB5004564, KB5004570} PS C:\Windows\System32>
-
Ok, I tried with the vertical offsets as well. No change. Maximized perfectly - even when spanning both displays. I suspect driver antics? What are the resolutions and scaling of monitor 1 and 2 ?
- 14 replies
-
- vcl styles
- drawing
-
(and 1 more)
Tagged with:
-
I didn't try that offset config. I always aligned the top or the bottom edges?
- 14 replies
-
- vcl styles
- drawing
-
(and 1 more)
Tagged with:
-
At least the thread suggests a replacement?
-
Also tried resizing the size of one monitor and aligning it to the top, as well as to the bottom. No unexpected size effects. Are you sure you are not running some Windows video driver software that manages windows?
- 14 replies
-
- vcl styles
- drawing
-
(and 1 more)
Tagged with:
-
I cannot replicate your problem on first try. Menu and title bar looks ok maximized on both screens. The size of the window adjusts according to DPI as I drag it from one screen to the other.
- 14 replies
-
- vcl styles
- drawing
-
(and 1 more)
Tagged with:
-
Well, from the VMs point - the virtual TPM is not software.
-
Interestingly, the TPM 2.0 spec appear to be as young as 2019. https://en.wikipedia.org/wiki/Trusted_Platform_Module https://trustedcomputinggroup.org/work-groups/trusted-platform-module/ VMs can have virtual TPMs. I guess that will be necessary for running W11 on a Mac.
-
Can you zip the project and attach the minimal app source here so that I can try your exact experiment on my two screen solutiuon? I have two 4k screens, but of different size, and the smaller has a different scaling.
- 14 replies
-
- vcl styles
- drawing
-
(and 1 more)
Tagged with:
-
It has been a decade and a half since that question popped up http://www.delphigroups.info/2/5/259636.html
-
I wonder, will the peripheral market pick up on the TPM need? Is it technically feasible to deliver TPM over USB, PCIe, or even PCI?
-
Do the two screens have different DPI? What kind of HighDPI settings do you have in the manifest?
- 14 replies
-
- vcl styles
- drawing
-
(and 1 more)
Tagged with:
-
Delphi integration with Quickbooks using REST
Lars Fosdal replied to misc_bb's topic in Network, Cloud and Web
The CData connectors are generic crap, and their license fees are exorbitant. -
Habari Client libraries 2021.06 for Apache ActiveMQ, Eclipse GlassFish and RabbitMQ released
Lars Fosdal replied to mjustin's topic in Delphi Third-Party
Have you considered supporting AMQP as an option to STOMP? -
FYI - Found out that Get-WmiObject doesn't work with PS 7.x. This works, but you need to run in an elevated pwsh instance. foreach($instance in Get-CIMInstance -Namespace Root\CIMV2\Security\MicrosoftTpm -Class Win32_Tpm) { $instance | Select-Object -Property * | Format-List } and for me it returns IsActivated_InitialValue : True IsEnabled_InitialValue : True IsOwned_InitialValue : True ManufacturerId : 1398033696 ManufacturerIdTxt : STM ManufacturerVersion : 73.4.17568.4452 ManufacturerVersionFull20 : 73.4.17568.4452 ManufacturerVersionInfo : PhysicalPresenceVersionInfo : 1.3 SpecVersion : 2.0, 0, 1.16 PSComputerName : CimClass : Root/CIMV2/Security/MicrosoftTpm:Win32_Tpm CimInstanceProperties : {IsActivated_InitialValue, IsEnabled_InitialValue, IsOwned_InitialValue, ManufacturerId…} CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
-
To check your current TPM status, Win+R and start tpm.msc To check your UEFI status, Win+R and start msinfo32.exe - look at BIOS mode There seems to be some loopholes with regards to TPM, but too early to be definitive about it. Edit: It seems that some BIOS firmware based solutions are accepted? https://www.windowscentral.com/best-trusted-platform-modules-tpm
-
There is still a lot of FUD about Windows 11 requirements. Seems that MS is revisiting some "older" (2017/2018) CPUs to see if they can be used, so it is not just about TPM, but also about drawing a line in the sand with regard to minimum CPU instruction set requirements. https://www.theverge.com/2021/6/28/22554245/microsoft-windows-11-cpu-intel-7th-gen-amd-zen-1-pc