

A.M. Hoornweg
Members-
Content Count
490 -
Joined
-
Last visited
-
Days Won
9
Everything posted by A.M. Hoornweg
-
tImageCollection in COM DLL - EXE needs manifest ???
A.M. Hoornweg replied to A.M. Hoornweg's topic in Windows API
Oww, that sounds like a pain. But I think it should be possible to just pack a manifest alongside an existing application, without embedding it and damaging the digital signature? -
tImageCollection in COM DLL - EXE needs manifest ???
A.M. Hoornweg replied to A.M. Hoornweg's topic in Windows API
The problem isn't tImageList related - the DLL used tImageList in the past without problems or manifest requirements until I replaced it with tImageCollection & tVirtualImageList. Also, the operating system is Windows 10, so comctl32 on the system is most certainly the current version. By the way, with a properly manifested application, the new icons display correctly even on Windows XP which is vintage so I don't think it's a matter of an outdated comctl32. ( edit: I compiled the test application under Delphi 11 fixpack 1 with {$SETPEOSVERSION 5.1} {$SETPESUBSYSVERSION 5.1} to make it work on XP). -
Developing under Windows 11 in a VM not feasible ?
A.M. Hoornweg replied to A.M. Hoornweg's topic in General Help
Sure. Until that time, I'll just stick with Windows 10 in the VM.- 26 replies
-
- virtualization
- vmware
-
(and 1 more)
Tagged with:
-
Developing under Windows 11 in a VM not feasible ?
A.M. Hoornweg replied to A.M. Hoornweg's topic in General Help
One simple workaround is to run Delphi inside a VMWare VM and to configure that VM so, that its resolution is 1920x1080 and "stretched". That way Delphi will run at a resolution of 2K even though the monitor really has a much higher resolution. As for DPI awareness in compiled Delphi applications themselves, I have a whole bunch of workarounds to make things work better. The key for me was to inherit every TForm from a common ancestor and to override some virtual methods in that ancestor (DoBeforeMonitorDPIChanged, DoAfterMonitorDPIChanged, Loaded, Docreate and some more ...) to fix the most egregious bugs. That way any form derived from that common ancestor behaves much better.- 26 replies
-
- virtualization
- vmware
-
(and 1 more)
Tagged with:
-
Developing under Windows 11 in a VM not feasible ?
A.M. Hoornweg replied to A.M. Hoornweg's topic in General Help
That workaround is well known, but it'll probably cease working when the first updates of Windows 11 appear. In that case one would be stuck with a possibly buggy initial version.- 26 replies
-
- virtualization
- vmware
-
(and 1 more)
Tagged with:
-
Developing under Windows 11 in a VM not feasible ?
A.M. Hoornweg replied to A.M. Hoornweg's topic in General Help
Some things (like Per-Monitor DPI-awareness V2) are really awkward to test through Remote Debugging. Delphi 11 still has tons of issues regarding DPI Awareness, for which I had to devise workarounds until Embarcadero hopefully gets it right. I expect some improvements to this feature in Windows 11 and it would be really nice to be able to debug it natively rather than remotely.- 26 replies
-
- virtualization
- vmware
-
(and 1 more)
Tagged with:
-
Developing under Windows 11 in a VM not feasible ?
A.M. Hoornweg replied to A.M. Hoornweg's topic in General Help
I have no desire to switch to a different virtualization product. My appreciation of VMWare far exceeds any desire for Windows 11.- 26 replies
-
- virtualization
- vmware
-
(and 1 more)
Tagged with:
-
Developing under Windows 11 in a VM not feasible ?
A.M. Hoornweg replied to A.M. Hoornweg's topic in General Help
That's not an option. VMWare workstation is essential to me, also because of compatibility with ESXI. (I don't know if other virtualizers that use "passthrough" TPM's don't have the same problem, because in that case the TPM also dies if the host breaks)- 26 replies
-
- virtualization
- vmware
-
(and 1 more)
Tagged with:
-
Developing under Windows 11 in a VM not feasible ?
A.M. Hoornweg replied to A.M. Hoornweg's topic in General Help
Will that work on a new hardware? I mean, will VMWare Workstation boot a recent backup, if I exchange my notebook for a new one?- 26 replies
-
- virtualization
- vmware
-
(and 1 more)
Tagged with:
-
Developing under Windows 11 in a VM not feasible ?
A.M. Hoornweg replied to A.M. Hoornweg's topic in General Help
A virtual HDD encrypted by VMWare would not be recoverable anymore indeed. [edit] I make weekly backups of my VM's on an external HDD. If they were cryptographically tied to my notebook's hardware, they would become worthless if my notebook broke.- 26 replies
-
- virtualization
- vmware
-
(and 1 more)
Tagged with:
-
Hello all, I have a question regarding dynamic methods in Delphi that handle Windows messages. The documentation is not clear about this. Suppose I declare a Windows message handler in my form like procedure WMNCCreate (var Message: TWMNCCreate); message WM_NCCREATE; with a trivial implementation like procedure WMNCCreate(var Message: TWMNCCreate); begin inherited; end; how is the inherited() call resolved by Delphi? Is it resolved by method name or by message number? In other words, does inherited() call an ancestor's method having the name WMNCCreate, or does it call any method that handles message number WM_NCCreate regardless of the method's name ?
-
inherited dynamic message handlers
A.M. Hoornweg replied to A.M. Hoornweg's topic in RTL and Delphi Object Pascal
Ah, I've overlooked that! Thanks! One of the reasons I asked is because many of these message handlers in Vcl.Forms are declared private. But apparently, the keyword "private" is meaningless for message methods if they're resolved by number. -
PixelsPerInch property in datamodules and services :-(
A.M. Hoornweg posted a topic in Delphi IDE and APIs
Hello all, it is *extremely* annoying that Delphi 11 writes a property "PixelsPerInch" into dfm files of type tDatamodule and tService. Such objects are totally non-visual so what the heck ? This property cause runtime errors when such projects are compiled with Delphi 10 or older. I now have to manually strip it from each and every data module using Notepad! -
PixelsPerInch property in datamodules and services :-(
A.M. Hoornweg replied to A.M. Hoornweg's topic in Delphi IDE and APIs
Would it not be necessary to change the DFM file too (change "object" into "inherited") because of this inheritance? -
PixelsPerInch property in datamodules and services :-(
A.M. Hoornweg replied to A.M. Hoornweg's topic in Delphi IDE and APIs
I like the idea, but it would require changing existing projects. Existing datamodules, services and frames would need to inherit from new classes. Maybe it would be more elegant to write a patching unit for older Delphi versions that hooks into the dfm reader and ignores PixelsPerInch. -
PixelsPerInch property in datamodules and services :-(
A.M. Hoornweg replied to A.M. Hoornweg's topic in Delphi IDE and APIs
AFAIK there is no property "scaled" in tService and tDatamodule, so why would the designer need to know PixelsPerInch if it's not supposed to do any scaling? There's "Width" and "Height" so it can still create the window big enough to display the placed components. As a workaround, I've written a command line application that detects if a DFM is tdatamodule or a tservice and if so, removes the "pixelsperinch" property. Maybe I should do the same for tFrame because I intend to always use 96 dpi in design mode. The tool is now integrated in my Finalbuilder build scripts and so far it looks promising. If it is error-free, I may use it inside a pre-commit hook in SVN as well. -
Delphi 11.0 Alexandria produces more compact x64 executables than 10.4.2 Sydney !
A.M. Hoornweg posted a topic in Delphi IDE and APIs
Hello World, I just had a pleasant surprise - when I build a certain x64 project of mine, the executable is noticeably smaller under Delphi 11 Alexandria (6.5 MB) than under Delphi 10.4.2 Sydney (7.3 MB). Embarcadero must have done some serious optimizations. (Edit) the project is compiled with {$WEAKLINKRTTI ON}. -
Delphi 11.0 Alexandria produces more compact x64 executables than 10.4.2 Sydney !
A.M. Hoornweg replied to A.M. Hoornweg's topic in Delphi IDE and APIs
I don't mean to compare Pascal to C. I just mean that Delphi has become less usable for low-level modular stuff because the executable size has become so big. Delphi 2009 was the last compiler that created really compact executables. -
Delphi 11.0 Alexandria produces more compact x64 executables than 10.4.2 Sydney !
A.M. Hoornweg replied to A.M. Hoornweg's topic in Delphi IDE and APIs
If Microsoft used Delphi, Windows would be a petabyte in size. -
Delphi 11.0 Alexandria produces more compact x64 executables than 10.4.2 Sydney !
A.M. Hoornweg replied to A.M. Hoornweg's topic in Delphi IDE and APIs
If many units are significantly smaller, it could indicate less inlining, less RTTI overhead, or a much more clever compiler (which would be a sensation). It would be interesting to do a few benchmarks and compare some generated assembly code. -
Delphi 11.0 Alexandria produces more compact x64 executables than 10.4.2 Sydney !
A.M. Hoornweg replied to A.M. Hoornweg's topic in Delphi IDE and APIs
I have no idea, it could be a lot of things. Maybe there's less inlining? Or are they finally using a more compact format for RTTI info? Or maybe LLVM is involved now? Whatever it is, I find the reduction in executable size impressive (I'm a sucker for efficiency). I would be interested to know if x86 code has become tighter also? -
How to use unit BufferedFileStream & FastCopy?
A.M. Hoornweg replied to Quarks's topic in General Help
A broken drive is much more costly than the price of the hardware alone. Hard drives *will* fail sooner or later. I have had at least 8 hdd's fail on me in my career. Drop a HDD hard and it's probably ruined (at least I wouldn't ever trust it anymore). If you order a HDD, you have no way of knowing if it was dropped or half frozen during shipping. SSD's OTOH are very insensitive to shocks and temperature differences. No moving parts! -
How to use unit BufferedFileStream & FastCopy?
A.M. Hoornweg replied to Quarks's topic in General Help
David asked "What's wrong with". So I pointed out some. OP may have other reasons, admittedly. 🙂 -
How to use unit BufferedFileStream & FastCopy?
A.M. Hoornweg replied to Quarks's topic in General Help
I avoid it for the following reasons. First of all, the CopyFileEx API documentation does not specify if the source file is opened for shared access or not. So I don't know how it behaves when multiple users are accessing the file and if that behavior may change in future. Secondly, when I copy a file somewhere, I emphatically want it to inherit the access properties of the target directory. Otherwise the access rights become unpredictable. Unfortunately, the CopyFileEx API documentation says "The security resource properties (ATTRIBUTE_SECURITY_INFORMATION) for the existing file are copied to the new file". I really don't want that to happen. -
Hello all, I recently stumbled upon some code whose syntax was new to me. That doesn't happen too often so I'm slightly overwhelmed. How do you call this elegant way of declaring constants, and is it documented somewhere? I especially like the implicit association between a type and values. Type tSomeType=( begindoc=$01, Newpage=$02, enddoc=$03 );