Still a cool video. Many shortcuts for various operating systems and machines, including BBC B, Linux, Windows, and MacOS.
–jeroen
Posted by jpluimers on 2021/08/20
Still a cool video. Many shortcuts for various operating systems and machines, including BBC B, Linux, Windows, and MacOS.
–jeroen
Posted in *nix, 6502, Apple, BBC Micro B, History, Linux, Mac OS X / OS X / MacOS, Power User, Windows | Leave a Comment »
Posted by jpluimers on 2021/08/19
Quite some interesting bits in [WayBack] Thread by @Foone: “So if you want to use a USB floppy drive, you use a USB protocol called the UFI: Uniform Floppy Interface. What’s UFI? A way to embed ATAPI […]”
Via [WayBack] Kristian Köhntopp on Twitter: “PC Hard drive and floppy disk interfaces, and the people and companies that made them.”
https://twitter.com/isotopp/status/1174609922316783616
–jeroen
Posted in Development, Hardware Development, History, Power User | Leave a Comment »
Posted by jpluimers on 2021/06/08
Too bad the whole mechanism involving TRegGroups.UnregisterModuleClasses is not documented anywhere
It is the underlying storage to support TClassFinder, which was introduced in Delphi 6, documented on-line in Delphi 2007, documented slightly in Delphi 2009, and since Delphi 2010 only one line of documentation was added (including the unchanged “instatiated”):
This is class
Classes.TClassFinder.
The
TClassFinderallows the list of registered persistent classes to be retrieved. Objects instatiated from persistent classes are those that can be stored (serialised) beyond the operation of the current application.
TClassFinderallows registered persistent classes to be retrieved.The
TClassFinderallows the list of registered persistent classes to be retrieved. Objects instatiated from persistent classes are those that can be stored (serialised) beyond the operation of the current application.
Back to TRegGroups.UnregisterModuleClasses: it takes a HMODULE parameter and ultimately gets called through the (since Delphi 2007) on-line documented [WayBack] Classes.UnRegisterModuleClasses Function
procedure UnRegisterModuleClasses(Module: HMODULE);Call UnRegisterModuleClasses to unregister all object classes that were registered by the module with the handle specified by the Module parameter. When a class is unregistered, it can’t be loaded or saved by the component streaming system.
After unregistering a class, its name can be reused to register another object class.
To get more context about the access violation, I used both the stack trace and a debugging watch for GetModuleName(Module) (using the [WayBack] SysUtils.GetModuleName Function).
In order to see which classes were registered by what module, I set a breakpoint at in TRegGroup.AddClass (which can be called through various code paths):
procedure TRegGroup.AddClass(AClass: TPersistentClass); begin FGroupClasses.Add(AClass); end;
HModuleThat gave me the class, but I also needed the HModule for a class, so I did a windows get module of currently executing code – Google Search, giving me these links, all C/C++ related:
I currently use the following trick (inspired from this forum):
const HMODULE GetCurrentModule() { MEMORY_BASIC_INFORMATION mbi = {0}; ::VirtualQuery( GetCurrentModule, &mbi, sizeof(mbi) ); return reinterpret_cast<HMODULE>(mbi.AllocationBase); }Is there a better way to do this that doesn’t look so hacky?
If you are using a Microsoft linker, you can take advantage of
a pseudovariable which the linker provides.EXTERN_C IMAGE_DOS_HEADER __ImageBase; #define HINST_THISCOMPONENT ((HINSTANCE)&__ImageBase)The pseudovariable
__ImageBase
represents the DOS header of the module, which happens to
be what a Win32 module begins with.
In other words, it’s the base address of the module.
And the module base address is the same as itsHINSTANCE.
Here you already see some confusion: there is HINSTANCE and HMODULE. That’s a historic thing, as described by Raymond Chen in [WayBack] What is the difference between HINSTANCE and HMODULE? | The Old New Thing:
They mean the same thing today, but at one time they were quite different.
It all comes from 16-bit Windows.
In those days, a “module” represented a file on disk that had been loaded into memory, and the module “handle” was a handle to a data structure that described the parts of the file, where they come from, and where they had been loaded into memory (if at all). On the other hand an “instance” represented a “set of variables”.
One analogy that might (or might not) make sense is that a “module” is like the code for a C++ class – it describes how to construct an object, it implements the methods, it describes how the objects of the class behave. On the other hand, an “instance” is like a C++ object that belongs to that class – it describes the state of a particular instance of that object.
In C# terms, a “module” is like a “type” and an instance is like an “object”. (Except that modules don’t have things like “static members”, but it was a weak analogy anyway.)
GetModuleNameSearching for delphi “__ImageBase” – Google Search then got me [WayBack] c++ – Get DLL path at runtime – Stack Overflow with a nice Delphi related answer by [WayBack] Ian Boyd:
For Delphi users:
SysUtils.GetModuleName(hInstance); //Works; hInstance is a special global variable SysUtils.GetModuleName(0); //Fails; returns the name of the host exe process SysUtils.GetModuleName(GetModuleFilename(nil)); //Fails; returns the name of the host exe processIn case your Delphi doesn’t have SysUtils.GetModuleName, it is declared as:
...
This reassured my use of [WayBack] SysUtils.GetModuleName code was OK:
function GetModuleName(Module: HMODULE): string; var ModName: array[0..MAX_PATH] of Char; begin SetString(Result, ModName, GetModuleFileName(Module, ModName, Length(ModName))); end;
HInstance in DelphiThe example from Ian Boyd also brought back memories from long ago about the [WayBack] HInstance Variable – Delphi in a Nutshell [Book]:
Posted in Conference Topics, Conferences, Delphi, Development, Event, History, Software Development | Leave a Comment »
Posted by jpluimers on 2021/05/25
Last week, I wrote about a bit of my command-line and scripting history at I wanted to know the loaded DLLs in a process like Process Explorer shows, but from the console: Sysinternals ListDLLs to the rescue.
Since information about VMS and DCL is harder to find nowadays, I saved some information in the wayback machine:
By now, there should be a good x86_64 version of OpenVMS, so this is also a reminder to self to see if that can run as a VM and is affordable enough to do some experimentation with.
–jeroen
Posted in Development, History, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2021/05/20
In Windows, historically most people approach investigation GUI first. Having turned 50 a while ago, I am no exception.
My real roots however are on the command-line and scripting: roughly 1980s Apple DOS, CP/M, SunOS (yay sh Bourne shell!), MS-DOS, 4DOS, and VAX/VMS (yay DCL shell!), from the 1990s on, some Solaris, a little bit of AIX, HP-UX and quite a bit of Linux, MacOS (né OS/X né Mac OS), and some BSD descendants derivatives (SunOS, AIX and MacOS are based on the Berkeley Software Distribution), and this century a more growing amount of PowerShell).
So I was glad to find out the makers of Process Explorer also made [WayBack] ListDLLs – Windows Sysinternals | Microsoft Docs (via windows get dlls loaded in process – Google Search)
List all the DLLs that are currently loaded, including where they are loaded and their version numbers.
ListDLLs is a utility that reports the DLLs loaded into processes. You can use it to list all DLLs loaded into all processes, into a specific process, or to list the processes that have a particular DLL loaded. ListDLLs can also display full version information for DLLs, including their digital signature, and can be used to scan processes for unsigned DLLs.
Usage
listdlls [-r] [-v | -u] [processname|pid]
listdlls [-r] [-v] [-d dllname]
Parameter Description processname Dump DLLs loaded by process (partial name accepted). pid Dump DLLs associated with the specified process id. dllname Show only processes that have loaded the specified DLL. -r Flag DLLs that relocated because they are not loaded at their base address. -u Only list unsigned DLLs. -v Show DLL version information.
Download: [WayBack] ListDlls.zip.
Now it is much easier to generate a draft deploy list of DLLs (and for Delphi: BPLs) based on a process running on a development machine.
Example output (the -r flags relocation warnings; the first part is the [WayBack] shim that Chocolatey created around the second which is from SysInternals):
Posted in Conference Topics, Conferences, Delphi, Development, Event, History, Software Development, Windows Development | Leave a Comment »
Posted by jpluimers on 2021/05/19
Editing [WayBack] What is a Delphi DCU file? – Stack Overflow for more historic correctness and adding links prompted me to archive some older material and search for some more, basically because while historically very relevant, link rot makes a lot of that stuff harder and harder to find.
The legendary full page colour advert published in the 12th 1983 issue of Byte Magazine on page 456 is at the bottom of this post (Many BYTE magaine issues have been archived at https://archive.org/details/byte-magazine).
The smaller version below is from WayBack: Sip from the Firehose : November 2008 marks the 25th anniversary of Turbo Pascal v1.0! (this article is not available on the Embarcadero or Idera site any more).
I also included more adverts in reverse chronological order at the end:
The last two via [WayBack] saundby.com: Software for the Ampro Little Board.
--jeroen
Posted in Conference Topics, Conferences, CP/M, Delphi, Development, Event, History, MS-DOS, Pascal, Power User, Software Development, Turbo Pascal, UCSD Pascal, Z80 | Leave a Comment »
Posted by jpluimers on 2021/04/23
Posted in Fun, History, Power User, Security | Leave a Comment »
Posted by jpluimers on 2021/04/12
Cool historic article: [WayBack] The Architecture of Open Source Applications: Sendmail by Eric Allman.
It is Chapter 17 of this book [WayBack]:
The Architecture of
Open Source Applications
Amy Brown and Greg Wilson (eds.)
ISBN 978-1-257-63801-7
I totally missed that book being published in 2014.
Great historic read!
–jeroen
Posted in *nix, *nix-tools, History, Power User, sendmail | Leave a Comment »
Posted by jpluimers on 2021/03/22
Cool: [Archive.is/WayBack] em-dosbox – Windows 3.11 on the Web.
Via [WayBack] JRWR – Forrest F. on Twitter: “I love this thing, http://vrcade.io/win311 Boots into Windows 3.11 with a internet connection (over a fake modem!)”
–jeroen
Posted in History, Windows, Windows 3.11 | 2 Comments »
Posted by jpluimers on 2021/03/08
This is so cool: [WayBack] Glenda 🐰 on Twitter: “You are likely to be eaten by a grue! Just finished a new #NerdStitch cross stitch project- Zork 1 (Apple II version). The second adventure game I ever played. #zork #EatenByAGrue #apple2 #Infocom” .
That cursor!
Posted in Fun, History | Leave a Comment »