- UID
- 5280
- 积分
- 9539
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-5-18
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
本帖最后由 newer 于 2013-4-21 17:50 编辑
实现了X86,X64不同版本的ARX运行文件加载。
[pcode=lisp,true]
(defun _Load_ODCL_Runtimes ( )
;; If ObjectDCL is already loaded return T, otherwise
;; attempt to load (return T on successful load, else
;; print an appropriate message; return nil).
(or
;; Already loaded, no need to do anything else.
(dcl_getversionex)
;; Not loaded, attempt to load the runtimes explicitly.
( (lambda ( / proc_arch arxname arxpath )
;; Determine the appropriate arx module for
;; the processor and the AutoCAD version.
(setq arxname
(strcat "OpenDCL"
(if
(and
(setq proc_arch
(getenv "PROCESSOR_ARCHITECTURE")
)
(< 1 (strlen proc_arch))
(eq "64"
(substr
proc_arch
(1- (strlen proc_arch))
)
)
)
".x64."
"."
)
(substr (getvar "acadver") 1 2)
".arx"
)
)
;; What was the result?
(cond
( (null (setq arxpath (findfile arxname)))
(princ (strcat "Couldn't find " arxname ".\n"))
nil
)
( (null (arxload arxpath nil))
(princ (strcat "Failed to load " arxname ".\n"))
nil
)
( t ) ;; We're good.
)
)
)
)
)
[/pcode] |
评分
-
参与人数 1 | 威望 +3 |
D豆 +3 |
贡献 +3 |
收起
理由
|
牢固
| + 3 |
+ 3 |
+ 3 |
技术引导讨论和指点奖! |
查看全部评分
|