How do I figure out the right icon size to use so that the icon matches Explorer's default drag-and-drop icon?
(I'm trying to use it with SHDoDragDrop if that matters.)
How do I figure out the right icon size to use so that the icon matches Explorer's default drag-and-drop icon?
(I'm trying to use it with SHDoDragDrop if that matters.)
Copyright © 2021 Jogjafile Inc.

The size depends on what's in the data object format. From the Shell, it's 96x96.
You can check that if you drag & drop a file into any valid drop target, the data object will contain the "DragImageBits" format and its data is a SHDRAGIMAGE structure:
If you're looking for a more static way, here is a code that seems to work, using the UxThemes API. Note that although it uses documented APIs and defines, I don't think it's documented as such.
As for DPI settings, I understand you want to mimic Explorer, in this case you'll have to do some computation by yourself depending on your needs and screen context, as the image size extracted by the Shell is itself fixed.