为什么在WIN2000下不能使用方法 VLAX-METHOD 'CONNECTSERVER 请高手赐教 (defun phyhar (/ ret serx objw lccon lox) (vl-load-com) (setq serx '()) (if (SETQ OBJW (VLAX-CREATE-OBJECT "wbemScripting.SwbemLocator")) (progn (SETQ lccon (VLAX-INVOKE OBJW 'ConnectServer "." "\\root\\cimv2" "" "" "" "" 128 nil ) ) (setq lox (vlax-invoke lccon 'ExecQuery "Select SerialNumber,Tag from Win32_PhysicalMedia" ) ) (vlax-for item lox (setq serx (cons (list (vlax-get item 'Tag) (vlax-get item 'SerialNumber ) ) serx ) ) ) (vlax-release-object lox) (vlax-release-object lccon) (vlax-release-object objW) ) ) (princ (reverse serx)) (princ) ) |