ollie 发表于 2022-7-6 22:59:33

任何人都知道Winsock处于活动状态

大家好,
 
正如标题所示,我正在为Winsock寻找vlax创建对象名。
 
任何帮助都将不胜感激
 
干杯
奥利

Lee Mac 发表于 2022-7-6 23:24:18

你好奥利,
 
我以为是:
 
MSWinsock.Winsock
 
但我可能错了。。。

Lee Mac 发表于 2022-7-6 23:40:28

这应该得到所有ProgID的列表
 

(defun GetProgIDs ( / *error* regPath file id ofile lst )
(vl-load-com)
;; Lee Mac~17.02.10

(defun *error* ( msg )
   (and ofile (close ofile))
   (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")
       (princ (strcat "\n** Error: " msg " **")))
   (princ)
)   

(if (setq file (getfiled "Output" "" "txt" 1))
   (progn

   (foreach desc (vl-registry-descendents
                     (setq regPath "HKEY_CLASSES_ROOT\\CLSID"))

       (if (setq id (vl-registry-read
                      (strcat regPath "\\" desc "\\ProgId")))
         
         (setq lst (cons (vl-princ-to-string id) lst))
       )
   )

   (setq ofile (open file "w"))
   
   (mapcar '(lambda ( x ) (write-line x ofile)) (acad_strlsort lst))
   
   (setq ofile (close ofile))
   )
)
(princ)
)

ollie 发表于 2022-7-6 23:52:07

李:你是史诗;我从出生起就一直在搜索上述函数

Lee Mac 发表于 2022-7-7 00:10:19

谢谢,奥利,我尽力了
页: [1]
查看完整版本: 任何人都知道Winsock处于活动状态