def Connect(rasEntryName, numRetries = 5):
	assert numRetries > 0
	for info in win32ras.EnumConnections():
		if string.lower(info[1])==string.lower(rasEntryName):
			print "Already connected to", rasEntryName
			return 0, info[0]

	dial_params, have_pw = win32ras.GetEntryDialParams(None, rasEntryName)
	if not have_pw:
		print "Error: The password is not saved for this connection"
		print "Please connect manually selecting the 'save password' option and try again"
		sys.exit(1)

	print "Connecting to", rasEntryName, "..."
	retryCount = numRetries
	while retryCount > 0:
		rasHandle, errCode = win32ras.Dial(None, None, dial_params, None)
		if win32ras.IsHandleValid(rasHandle):
			bValid = 1
			break
		print "Retrying..."
		win32api.Sleep(5000)
		retryCount = retryCount - 1
	
	if errCode:
		raise ConnectionError(errCode, win32ras.GetErrorString(errCode))
	return 1, rasHandle
Make a connection to the specified RAS entry.
dataset/ETHPy150Open deanhiller/databus/webapp/play1.3.x/python/Lib/site-packages/win32/scripts/rasutil.py/Connect