马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
本帖最后由 marting 于 2018-3-16 12:54 编辑
 - (defun XD::InterNet:GetFileSize (RemoteFileName / objHTTP Result)
- (if (setq objHTTP (vlax-create-object "WinHTTP.WinHTTPRequest.5.1"))
- (progn (setq Result (vl-catch-all-apply
- (function
- (lambda ()
- (vlax-invoke-method
- objHTTP "Open" "HEAD" RemoteFileName :vlax-false)
- (vlax-invoke objHTTP "Send")
- (if (= (vlax-get-property objHTTP "Status") 200)
- (vlax-invoke-method
- objHTTP
- "GetResponseHeader"
- "Content-Length"
- )
- )
- )
- )
- )
- )
- (vlax-release-object objHTTP)
- (if (and Result (not (vl-catch-all-error-p Result)))
- (read Result)
- )
- )
- )
- )
命令: (XD::INTERNET:GETFILESIZE "http://bbs.xdcad.net/forum.php")
2513
|