max sdk: how to get data from selection

Hey. I'm wanting to write a plugin using the max sdk. I cant seem to find a way to do some of the following things.

[LIST]
[*]get current selection and selection type
[*]get data from selection or subobject selection (for editable poly objects)
[/LIST]

The reason I need this to be a plugin and not a script is because I need to get this data REALLY fast (once per frame), and a script just isn't gonna do it.

I've looked through the iNode class and couldn't find a method that would return a pointer to the currently selected nodes.
Also, tho I could find methods that would get the indexes of selected vertexes, I still need to get the actual coordinates.

Help in answering these questions would be greatly appreciated.