This is not supported, and it *will* change. You can send a message to a window object like this:
void *native_window_for_my_system = object_method(w, gensym("getsyswind");
In Max 5, on a Mac, this will return the carbon WindowRef. In Max 6, however, it will return an NSView*.
You'll need to use maxversion() or similar to detect this and handle appropriately in your code.
best,
Tim