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 www.yahoo.com but it sounds stupid. 10x in advance +ZergoMan
Posted on 2001-03-01 14:56:00 by +ZergoMan

.code
start:
    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
    .endif
Posted on 2001-03-01 18:31:00 by david
Check your _local_ IP address, if it's "127.0.0.1" 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
	.IF eax == SOCKET_ERROR
		xor eax, eax
		ret
	.ENDIF
	invoke gethostbyname, addr szHostName
	.IF ! eax
		xor eax, eax
		ret
	.ENDIF
	mov eax, dword ptr 
	mov eax, dword ptr 
	mov eax, dword ptr 
	sub eax, 1*256*256*256 + 127 
	ret
CurrentlyOnline	ENDP
hope this helps Clive [ Entro-P ]
Posted on 2001-03-02 04:57:00 by Entro-P