Declaring Win32 stuff for Bmax?

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

Changing the Byte Array to a Byte Pointer makes no difference. It still returns the same error code.

I'm a little unclear on the freeing of the FromCString's. If all I have is a Byte Pointer, I have no idea how to free memory it points to. Just MemFree?

When do I need to free them and when can I let them pass?

For example, do I need to free it myself with this sort of thing as well?

   GetWindowText(HWND,CharBuffer,255)
   WindowName=String.FromCString(CharBuffer)


Presumably not since I have a proper variable for this, and not a pointer.