termination codes

Developer
Aug 19, 2013 at 7:48 PM
While investigating some of our device related woes, a tester colleague of mine pointed out the "RAS Connection Termination" codes as described in http://technet.microsoft.com/en-us/library/cc773767(v=ws.10).aspx - we've been getting them - 829 usually - logged in the event log. (This is in spite of the article saying Windows Server 2008 only, and we have Windows 7 client machines.) I couldn't find anything in the DotRas documentation for 1.2 about getting these programmatically with DotRas. Am I correct in concluding DotRas doesn't do anything with them?

(Incdentally, the help format used is pretty weirdly permissive in search matches: "termination" found "terminal".)
Coordinator
Aug 20, 2013 at 2:18 AM
Edited Aug 20, 2013 at 2:19 AM
All DotRas does is wrap the exception in a RasException and bubble it back up to you. If you check the RasError.h included in the Windows SDK you'll see that particular error code corresponds to:
#define RASBASE 600
#define ERROR_LINK_FAILURE (RASBASE + 229)
/*
 * The modem (or other connecting device) was disconnected due to link failure.
*/
Hope that helps!
Developer
Aug 20, 2013 at 1:31 PM
Hm, it wasn't obvious in context that the termination codes are also RasErrors , though I do see that one corresponding (at least in description). The funny thing is, my try ... catch doesn't seem to always get that. Could it be if I dial synchronously I get no more exceptions once the Dial returns successfully, so that if an error occurs later I don't get it? That's what seems to happen ... I'll investigate a bit more, since I have yet to hear from our contact from the hardware folks.
Coordinator
Aug 22, 2013 at 3:55 AM
Edited Aug 22, 2013 at 3:55 AM
Well, that link you posted has the exact same message as what I posted above for that particular error code. What you're seeing could be, though DotRas shouldn't be doing that at all. It's just calling the Microsoft API and telling you what their API returned to it.