마음의 안정을 찾기 위하여 - [Delphi][Internet] 인터넷 접속 유무를 체크하는 방법.
2267098
1435
804
관리자새글쓰기
태그위치로그방명록
별일없다의 생각
dawnsea's me2day/2010
색상(RGB)코드 추출기(Color...
Connection Generator/2010
최승호PD, '4대강 거짓말 검...
Green Monkey**/2010
Syng의 생각
syng's me2DAY/2010
천재 작곡가 윤일상이 기획,...
엘븐킹's Digital Factory/2010
[Delphi][Internet] 인터넷 접속 유무를 체크하는 방법.
Delphi/인터넷 관련 | 2008/07/01 10:27
현재 사용중인 PC가 인터넷에 접속되어 있는지 유무를 확인할 수 있는 방법을 알아보자.

인터넷에 접속가능한 상태를 알아보는 방법은 Wininet.DLL 에 내장된 "InternetGetConnectedState"이라는 함수를 이용하여 손쉽게 확인이 가능하다.

사용방법은 아래와 같다.

is_connect := InternetGetConnectedState(@param, 0);
If is_connect=True Then Begin
  // Internet 접속 상태
End;



BOOL InternetGetConnectedState(
  LPDWORD lpdwFlags,
  DWORD dwReserved
);

Parameters

lpdwFlags
[out] Pointer to a variable that receives the connection description. This parameter may return a valid flag even when the function returns FALSE. This parameter can be one or more of the following values.
ValueMeaning
INTERNET_CONNECTION_CONFIGURED
0x40
Local system has a valid connection to the Internet, but it might or might not be currently connected.
INTERNET_CONNECTION_LAN
0x02
Local system uses a local area network to connect to the Internet.
INTERNET_CONNECTION_MODEM
0x01
Local system uses a modem to connect to the Internet.
INTERNET_CONNECTION_MODEM_BUSY
0x08
No longer used.
INTERNET_CONNECTION_OFFLINE
0x20
Local system is in offline mode.
INTERNET_CONNECTION_PROXY
0x04
Local system uses a proxy server to connect to the Internet.
dwReserved
[in] Reserved. Must be zero.

Return Value

Returns TRUE if there is an active modem or a LAN Internet connection, or FALSE if there is no Internet connection, or if all possible Internet connections are not currently active. For more information, see the Remarks section.

When InternetGetConnectedState returns FALSE, the application can call GetLastError to retrieve the error code.

2008/07/01 10:27 2008/07/01 10:27
Article tag list Go to top
View Comment 0
Trackback URL :: 이 글에는 트랙백을 보낼 수 없습니다
 
 
 
 
: [1] ... [555][556][557][558][559][560][561][562][563] ... [1317] :
«   2024/03   »
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
전체 (1317)
출판 준비 (0)
My-Pro... (41)
사는 ... (933)
블로그... (22)
My Lib... (32)
게임 ... (23)
개발관... (3)
Smart ... (1)
Delphi (93)
C Builder (0)
Object... (0)
VC, MF... (10)
Window... (1)
Open API (3)
Visual... (0)
Java, JSP (2)
ASP.NET (0)
PHP (5)
Database (12)
리눅스 (29)
Windows (25)
Device... (1)
Embedded (1)
게임 ... (0)
Web Se... (2)
Web, S... (21)
잡다한... (6)
프로젝트 (0)
Personal (0)
대통령... (13)
Link (2)