Fog Creek Software
Discussion Board




Accessing raw Windows handles from RAS

I have recently inherited some code that uses RAS to dial up a remote site with the intention of linking it in to an X25 library which works directly with Windows handles (ie: using ReadFile and WriteFile). This will save a lot of time and effort in my current project.

However, I'm not sure that RAS provides such a function to get at the raw Windows handle. Does anybody know if it exists?

Better than being unemployed...
Wednesday, May 21, 2003

"...Windows handles (ie: using ReadFile and WriteFile)" -- you're talking about Named Pipes possibly?
http://msdn.microsoft.com/library/en-us/ipc/base/named_pipes.asp

Duncan Smart
Wednesday, May 21, 2003

Perhaps the X25 lib is intending to use ReadFile and WriteFile to access the com port?

Whereas RAS gives you TCP/IP (or whatever protocols you've installed).

So you could open a TCP socket and use ReadFile / WriteFile on the socket.  I assume that a TCP socket is a valid win32 handle, but I don't know that for sure.

-
Thursday, May 22, 2003

Found the answer tucked away in the bowels of MSDN via some example code showing you how to get the baud rate of a RAS connection.

Thanks anyway.

Better Than Being Unemployed...
Friday, May 23, 2003

*  Recent Topics

*  Fog Creek Home