O'Reilly logo

Network Programming for Microsoft® Windows®, Second Edition by Jim Ohlund, Anthony Jones

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Connection Management

RAS has two useful functions that allow you to retrieve the properties of connections established on your system: RasEnumConnections and RasGetProjectionInfo. RasEnumConnections can retrieve all the available active RAS connections on your system. This is useful when you need to obtain connection specific information about a RAS connection on your system using RasGetProjectionInfo, as you will see later in this chapter. The RasEnumConnections is defined as

DWORD RasEnumConnections(
    LPRASCONN lprasconn,
    LPDWORD lpcb, 
    LPDWORD lpcConnections
);

The lprasconn parameter is an application buffer that will receive an array of RASCONN structures. A RASCONN structure is defined as

 typedef struct _RASCONN  {      DWORD dwSize;  ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required