ObjectARX

ObjectARX

Reply
Mentor
diagodose2009
Posts: 263
Registered: ‎12-04-2009
Message 1 of 4 (197 Views)
Accepted Solution

How to register the “ClassDictionary of AcBrEntity” ?

197 Views, 3 Replies
11-18-2012 03:26 PM

How to register the “ClassDictionary of (cBrEntity” ?

You search ??? atmy source VisualC++s.

 

#include "brgbl.h"

#include "brent.h"

#include "brtrav.h"

#include "brment.h"

#include "brsample_pch.h"  //precompiled header

 

[source]

AcRx::AppRetCode acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt)

{

    switch (msg) {

    case AcRx::kInitAppMsg:

        asserte("G170");

        acrxDynamicLinker->unlockApplication(pkt);

      acrxDynamicLinker->registerAppMDIAware(pkt);

        //initAsdkIconSamp();

 

        initApp();

      if (!(acrxClassDictionary->at(_T("AcBrEntity"))))

        {

        asserte("G240");

            if (acrxDynamicLinker->loadModule(_T("libacbr.dll"), 1)) ?????

                  ads_printf(_T("\nLoadLibraryEx(\"libacbr.dll\")=ok"));

            else

                  ads_printf(_T("\nLoadLibraryEx(\"libacbr.dll\")=failed g240err\n"));

 

        asserte("G241");

            if (acrxClassDictionary->at(_T("AcBrEntity")))  ????

                  ads_printf(_T("\nRegisterClassDictionary(\"libacbr.dll\")=ok\n"));

             else

                  ads_printf(_T("\nRegisterClassDictionary(\"libacbr.dll\")=failed g241err\n"));

            };

            break;

[/source]

 

At text screen (at line command):

[source]

AcRxDynamicLinker failed to load 'libacbr.dll'

LoadLibraryEx("libacbr.dll")=failed g240err

RegisterClassDictionary("libacbr.dll")=failed g241err

[/source]

 

 

Best regards.

Thank you., for your replay.....

:smileytongue:

I found the solution  ,myself

[source]

 #define DLLNAME_ACBR "acbr17.dbx"

       initApp();
    if (!(acrxClassDictionary->at(_T("AcBrEntity"))))
      {
        if (acrxDynamicLinker->loadModule(_T(DLLNAME_ACBR), 1))
            ads_printf(_T("\nLoadLibraryEx(\"DLLNAME_ACBR\")=ok"));
        else
            ads_printf(_T("\nLoadLibraryEx(\"DLLNAME_ACBR\")=failed g240err\n"));
[/source]

 

Moderator
Alexander.Rivilis
Posts: 1,458
Registered: ‎04-09-2008
Message 2 of 4 (179 Views)

Re: How to register the “ClassDictionary of AcBrEntity” ?

11-19-2012 01:24 AM in reply to: diagodose2009

Maybe instead of "libacbr.dll" you have to use "acbrNN.dbx" (NN is 17 for AutoCAD 2007...2009, 18 - for AutoCAD 2010...2012 and 19 for AutoCAD 2013) ?


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

Mentor
diagodose2009
Posts: 263
Registered: ‎12-04-2009
Message 3 of 4 (170 Views)

Re: How to register the “ClassDictionary of AcBrEntity” ?

11-19-2012 06:06 PM in reply to: Alexander.Rivilis

Thank you., for your replay.....

:smileytongue:

I found the solution  ,myself

[source]

 #define DLLNAME_ACBR "acbr17.dbx"

       initApp();
    if (!(acrxClassDictionary->at(_T("AcBrEntity"))))
      {
        if (acrxDynamicLinker->loadModule(_T(DLLNAME_ACBR), 1))
            ads_printf(_T("\nLoadLibraryEx(\"DLLNAME_ACBR\")=ok"));
        else
            ads_printf(_T("\nLoadLibraryEx(\"DLLNAME_ACBR\")=failed g240err\n"));
[/source]

 

Distinguished Mentor
owenwengerd
Posts: 686
Registered: ‎08-06-2002
Message 4 of 4 (160 Views)

Re: How to register the “ClassDictionary of AcBrEntity” ?

11-19-2012 09:20 PM in reply to: diagodose2009

If your module has a dependency on the acbr17.dbx module, then you should be calling loadModule() regardless whether it is already loaded (and call unloadModule() when your dependency expires).

--
Owen Wengerd
ManuSoft
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.