How is TPrinter.GetPrinter used?

Hi all,

I am trying to get the device capabilities of the current printer and
it seems as if the TPrinter.GetPrinter is the function to use.

However, the driver and port names returned are empty strings (the
device name returns OK) and I can't seem to figure out how to use the
ADeviceMode parameter (which is a THandle).

Logically, the ADeviceMode can somehow be mapped to a TDeviceMode
structure, but how?

The documentation does not provide much help (as usual...). Of course,
neither the THandle and TDeviceMode datatypes are documented.

Thanks a lot for your help!

Best regards,

Ole Thrane