This days i'm sweating over this Internet... functions. I tryed using INternetGetConnectedState but it returns INTERNET_CONNECTION_LAN in any case. Is there any other ring-3 way of cheking for an active connection? Somebody told me that I can try to establish connection with some remote server like but it sounds stupid. 10x in advance +ZergoMan
Posted on 2001-03-01 14:56:00 by +ZergoMan

    mov eax,sizeof RASCONN
    inc eax
    mov lprasconn[0].dwSize,eax
    invoke RasEnumConnections,Addr lprasconn[0],Addr lpcb,Addr lpcConnections
    .if lpcConnections == 0
    invoke MessageBox,NULL,Addr conerror,Addr titl,MB_OK
    invoke ExitProcess,NULL
Posted on 2001-03-01 18:31:00 by david
Check your _local_ IP address, if it's "" then you arn't online if it's something else, then an internet connection is established. source :

CurrentlyOnline	PROC
	LOCAL	szHostName	:BYTE
	invoke gethostname, ADDR szHostName, MAXSZHOSTNAME
		xor eax, eax
	invoke gethostbyname, addr szHostName
	.IF ! eax
		xor eax, eax
	mov eax, dword ptr 
	mov eax, dword ptr 
	mov eax, dword ptr 
	sub eax, 1*256*256*256 + 127 
CurrentlyOnline	ENDP
hope this helps Clive [ Entro-P ]
Posted on 2001-03-02 04:57:00 by Entro-P