Yep wp (thanks for your reply!) ... just 10 minutes ago i'd realized that.

So i can give an update:
Step forwards after a couple of trials with doing:
1. defining return value ("ret") as DWord_Ptr (which is correct!) does remove the crash. Before it was Cardinal (which had never played a role before resp. in the stand-alone exe, but now crashes within the plugin!)
2. I inspect the castings now:
a)
ret := SHGetFileInfoW(PWideChar(WideString(fiFilePath)), 0, sfi, SizeOf(sfi), ...
.
--> "ret" is ok now, sfi.hIcon is > 0, but i don't see any icon (*)
b)
ret := SHGetFileInfoW(Pointer(WideString(fiFilePath)), 0, sfi, SizeOf(sfi), ....
--> "ret" is ok now, sfi.hIcon is > 0, and i can see an icon ... at least if i click onto the item icon's area, else not (*)
(*) This is probably by the dark theme painting reps. my uplaying code, and not a chapter for here. I'll dig elsewhere.
Btw.: actually, in the NPP's default (light) theme, i don't see the listview icons painted at all yet. Need to dig.
What i can say: they
are retrieved and i can SaveToFile them for test ....
But the icons i retrieved via "
PWideChar(WideString(" differ physically from those retrieved via "
Pointer(WideString(". Strange crawling ...
wp, do you have any idea why it might - within a plugin - such a sensible reaction on the type of ret if it is not DWord_Ptr, differently to a 'normal app'?