Visual Basic - Activar prog con la conexion

Life is soft - evento anual de software empresarial
 
Vista:

Activar prog con la conexion

Publicado por Alex (39 intervenciones) el 09/07/2001 11:24:41
Hola
necesito saber como puedo hacer para que, cada vez que se active la conexion a internet, se active mi programa.

Un saludo
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Activar prog con la conexion

Publicado por Gaba (43 intervenciones) el 09/07/2001 12:53:55
'''para saber si hay alguna conexion activa
Public Declare Function RasHangUp Lib "rasapi32.dll" Alias "RasHangUpA" (ByVal hRasConn As Long) As Long
Public Const RAS_MAXENTRYNAME As Integer = 256
Public Const RAS_MAXDEVICETYPE As Integer = 16
Public Const RAS_MAXDEVICENAME As Integer = 128
Public Const RAS_RASCONNSIZE As Integer = 412
Public Const ERROR_SUCCESS = 0

Public Type RasConn
dwSize As Long
hRasConn As Long
szEntryName(RAS_MAXENTRYNAME) As Byte
szDeviceType(RAS_MAXDEVICETYPE) As Byte
szDeviceName(RAS_MAXDEVICENAME) As Byte
End Type

Private EstadoTransfe As Byte
Declare Function RasEnumConnections Lib "rasapi32.dll" Alias "RasEnumConnectionsA" (lprasconn As Any, lpcb As Long, lpcConnections As Long) As Long
'''''''''''''''''''''''''''''''''
'si rascount hay conexion
Function RASCount() As Integer
Dim lprasconn(0 To 1) As Long ' dummy buffer area
Dim rc As Long ' return code
Dim lpcb As Long ' buffer size
Dim lpcConnections As Long ' connection count
lprasconn(0) = 32 ' each returned item is at least 32 bytes long
lpcb = 0 ' set total number of usable bytes in the buffer to zero
rc = RasEnumConnections(lprasconn(0), lpcb, lpcConnections)
RASCount = lpcConnections ' return connection count
End Function
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar