找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 559|回复: 2

[ARX程序]:xd, 问一下:怎样判断一个Arx是否已加载?

[复制链接]
发表于 2002-9-20 17:13:00 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
谢谢!

lyhSoft
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!

已领礼包: 145个

财富等级: 日进斗金

发表于 2002-9-20 19:06:23 | 显示全部楼层
使用:

Global Functions

AcRx Global Functions

  acrxLoadedApps

Include File

rxregsvc.h

void*

acrxLoadedApps();

This function returns a pointer to an AcDbVoidPtrArray that contains copies of the file names or URLs of all the currently loaded ObjectARX applications. These are the same strings that are reported by the AutoCAD ObjectARX command's "?" option.
It is the caller's responsibility to free all the strings in the array and to delete the array itself when finished with it.

获得当前加载的ARX应用程序。

下面给你个代码:


  1. [FONT=courier new]
  2. bool isModuleLoaded(const char* str)
  3. {
  4.         AcDbVoidPtrArray* pApps = reinterpret_cast<AcDbVoidPtrArray*>(acrxLoadedApps());
  5.         if (pApps==NULL)
  6.                 return false;
  7.         bool bFound = false;
  8.         for (int i=0;i<pApps->length();i++)
  9.         {
  10.                 if (stricmp(reinterpret_cast<const char*>(pApps->at(i)),str)==0)
  11.                 {
  12.                         bFound = true;
  13.                         break;
  14.                 }
  15.         }
  16.         for (;pApps->length()>0;)
  17.         {
  18.                 delete reinterpret_cast<char*>(pApps->at(0));
  19.                 pApps->removeAt(0);
  20.         }
  21.         delete pApps;
  22.         return bFound;
  23. }
  24. [/FONT]
复制代码
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2002-9-22 09:20:53 | 显示全部楼层
我找了半天,都想不出  appload . Arx  的原理 !  谢谢你,xd!
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2024-5-23 02:06 , Processed in 0.183718 second(s), 35 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表