TA的每日心情![](source/plugin/dsu_paulsign/img/emot/kx.gif) | 开心 2024-8-31 15:58 |
---|
签到天数: 89 天 [LV.6]常住居民II
管理员
- 积分
- 3366
|
;;;[函数] Vlisp实现后台静默从网上下载文件功能 (cx-DownLoad "http://www.youyicad.com/download/YouYi_Lib.VLX" "c:\\testggggggg.vlx")
(defun cx-DownLoad(Url_String SaveFile_String / adobd xmlx)
(Setq XmlX (vlax-get-or-create-object "Msxml2.XMLHTTP"))
(vlax-invoke-method XmlX 'open "Get" Url_String 0)
(vlax-invoke-method XmlX 'Send)
(setq AdoBd(vlax-get-or-create-object "ADODB.Stream"))
(vlax-put-property AdoBd 'Mode 3)
(vlax-put-property AdoBd 'Type 1)
(vlax-invoke AdoBd 'open)
(vlax-invoke-method AdoBd 'Write (vlax-Get-property XmlX 'responseBody))
(vlax-invoke-method AdoBd 'SaveToFile SaveFile_String 2)
(cx-ReleaseObject XmlX)
(cx-ReleaseObject AdoBd)
) |
|