{As an FTC programmer, I can tell you that the closest to C++ and Windriver you'll get with the NXT is RobotC. If you have an FTC team in the area, they have a license. There's also a 30 day trial, if you want to test it.
I am unaware if there is a way for FRC teams to get it free/cheap without an FTC team to lend it, though.}
EDIT: Wow, misread/misunderstood the question. I'm going to go away now, until I can test it out.
EDIT 2: Looks like a couple of things. The default output appears to be I2C using the cables provided. So, if you can figure that out, you can probably get the cRIO talking that way. DIO would be your friend. Alternatively, you can crack the thing open, and solder on two wire leads, then close it again.
How To Do It. Then it should be usable for both.
Of course, if you go through the trouble of opening it, you may as well just use a momentary pushbutton, unless the enclosure is important.