Declaring Win32 stuff for Bmax?

BlitzMax Forums/BlitzMax Beginners Area/Declaring Win32 stuff for Bmax?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I'm converting some old BPlus code to BMax, and can't understand why some of my User32, Kernel32, etc DECLS won't work when converted to BMax's format, but some do. If it was all not working, I would at least know where the problem was.

For example,

BPlus

GetWindowThreadProcessId%(hwnd%,processid*):"GetWindowThreadProcessId"
GetClassName%(hwnd%,classname*,max%):"GetClassNameA"


BMax

Function GetWindowThreadProcessId(hWnd:Int,ID:Byte Ptr)
Function GetClassName(hWnd:Int,clString:Byte Ptr,nMaxCount:Int) = "GetClassNameA"	


GetWindowThreadProcess works fine, but GetClassName doesn't work, either with or without the "GetClassNameA". It's not an isolated function either, there are quite a lot that I can't define.

1) What am I doing wrong?

2) Can I save myself the trouble? Has anyone made a complete ( or near complete ) list of these declarations for Max?