Detect if a plugin is 32 or 64 bit

When scanning for plugins on windows, a 32bit plugin will fail in a 64bit host and vice versa.
Is there a way to figure out if a dll is 64/32 bit, so that I can present my users with a propper error message?

That’s something I meant to add, but IIRC it was a bit trickier than you’d expect and I never had time to do it. Needed some messy win32 calls to figure it out, I think…

I’ll do some research

Any luck yet? I need this too. thx!

Sorry, no I suddenly got other more pressing issues.
What I did find out was that it is possible to get the information from the header of the dll file: