Group: Remote Access Service (RAS) - Library: rasapi32
The RasEnumConnections function lists all active RAS connections. It returns each connection"s handle and phone-book entry name.
Retrieving list of all active RAS connections
DWORD RasEnumConnections(
LPRASCONN lprasconn, // buffer to receive connections data
LPDWORD lpcb, // size in bytes of buffer
LPDWORD lpcConnections // number of connections written to buffer
);
DECLARE INTEGER RasEnumConnections IN rasapi32;
STRING @ lprasconn,;
INTEGER @ lpcb,;
INTEGER @ lpcConnections
lprasconn [in, out] Pointer to a buffer that receives, on output, an array of RASCONN structures, one for each RAS connection.
lpcb [in, out] Pointer to a variable that, on input, contains the size, in bytes, of the buffer specified by lprasconn.
lpcConnections [out] Pointer to a variable that receives the number of RASCONN structures written to the buffer specified by lprasconn.
If the function succeeds, the return value is zero.