How can I access the raw stack data? MS callback proc prototype changes when asm starts popping the stack

For these apis and their Ex versions
EnumResourceTypesA function (winbase.h) - Win32 apps | Microsoft Docs
EnumResourceNamesA - Win32 apps | Microsoft Docs
EnumResourceLanguagesA function (winbase.h) - Win32 apps | Microsoft Docs

with these callback procedures
ENUMRESTYPEPROCA (libloaderapi.h) - Win32 apps | Microsoft Docs
ENUMRESNAMEPROCA (libloaderapi.h) - Win32 apps | Microsoft Docs
EnumResLangProc callback function (Windows) | Microsoft Docs

there is no combination of pragma statement with or without the C or Pascal attribute that works with full access to the Class methods and properties that called it unless you do whats described below!

So by having the first 3 parameters as Longs which do nothing, and then adding the parameters defined in the callback procedures above in reverse order to how MS have documented, you get the correct parameters back and it all works very nicely. :smiley:

I’ll be using this on other callback procedures of this type now that I’ve discovered it because I have the added luxury of being able to access the class in its entirety when I change the lParam datatype from a long to my BaseClassName. This is afterall what I wanted to achieve anyway, I have it working and I’m running with it.

You aint changing my mind on this one! :face_with_raised_eyebrow: