2017-02-13

Delphi - 인터넷 연결여부

uses WinInet;
 
 const
   INTERNET_RAS_INSTALLED          = $10 ;
   INTERNET_CONNECTION_OFFLINE     = $20 ;
   INTERNET_CONNECTION_CONFIGURED  = $40 ;
   
 function InternetCon:Boolean;  //Connected : True
 var
    dwConnectionTypes: DWORD;
 begin
  if(InternetGetConnectedState(@dwConnectionTypes, 0)) then
  begin
    if((dwConnectionTypes and INTERNET_CONNECTION_MODEM)      <> 0)then Result := True;
    if((dwConnectionTypes and INTERNET_CONNECTION_LAN)        <> 0)then Result := True;
    if((dwConnectionTypes and INTERNET_CONNECTION_PROXY)      <> 0)then Result := True;
    if((dwConnectionTypes and INTERNET_CONNECTION_MODEM_BUSY) <> 0)then Result := True;
    if((dwConnectionTypes and INTERNET_RAS_INSTALLED)         <> 0)then Result := True;
    if((dwConnectionTypes and INTERNET_CONNECTION_OFFLINE)    <> 0)then Result := True;
    if((dwConnectionTypes and INTERNET_CONNECTION_CONFIGURED) <> 0)then Result := True;
  end
  else Result := False;
 end;

Delphi : DateUtils.pas 날짜함수 정리

http://www.delmadang.com/community/bbs_view.asp?bbsNo=21&bbsCat=0&indx=209893&page=41 델파이에 날짜함수를 모아둔 DateUtils.pas 가 있습니다. ...