正式会员享受无限制浏览网站功能和高速网盘下载,赶快加入本站吧!
您需要 登录 才可以下载或查看,没有账号?立即注册
x
- function InternetCheckConnection (lpszUrl: string; dwFlags: integer; dwReserved: integer): boolean;
- external 'InternetCheckConnectionW@wininet.dll stdcall';
- function InitializeSetup (): Boolean;
- begin
- if InternetCheckConnection('http://www.hanzify.org/', 1, 0) then
- result:= true
- else
- begin
- result:= false;
- MsgBox('你还没有与互联网连接,安装程序无法继续!', mbInformation, MB_OK);
- end;
- end;
- ANSI 和 Unicode 版都通用的代码是:
- #ifdef UNICODE
- #define A "W"
- #else
- #define A "A"
- #endif
- function InternetCheckConnection (lpszUrl: string; dwFlags: integer; dwReserved: integer): boolean;
- external 'InternetCheckConnection{#A}@wininet.dll stdcall';
- function InitializeSetup (): Boolean;
- begin
- if InternetCheckConnection('http://www.hanzify.org/', 1, 0) then
- result:= true
- else
- begin
- result:= false;
- MsgBox('你还没有与互联网连接,安装程序无法继续!', mbInformation, MB_OK);
- end;
- end;
复制代码 |