without connection to the inet renguard crashes [message #80594] |
Thu, 15 April 2004 22:40   |
dommafia
Messages: 37 Registered: September 2003 Location: USA
Karma:
|
Recruit |
|
|
Dante |
#include <ras.h>
#define MAX_CONNECTIONS 128
bool gotconnection() {
RASCONN rcConnection[ MAX_CONNECTIONS ];
DWORD dwTotalConnections;
// Set Buffer Size
rcConnection[0].dwSize = sizeof( RASCONN );
dwBufferSize = MAX_CONNECTIONS * sizeof( RASCONN );
// I can Enumerate Connections ?
if (RasEnumConnections (rcConnection, &swBufferSize, &dwTotalConnections))
return false;
// There is Connections ?
if( dwTotalConnections )
{
return true;
} else {
return false;
}
}
|
:clapping:
|
|
|