This is fascinating. Having done some amateur-level coding against the AmigaDOS API, it's really interesting to see the origins of the data structures and why all that casting to/from BPTR and BSTR types is required.