How to register the “ClassDictionary of AcBrEntity” ?

How to register the “ClassDictionary of AcBrEntity” ?

diagodose2009
Collaborator Collaborator
655 Views
3 Replies
Message 1 of 4

How to register the “ClassDictionary of AcBrEntity” ?

diagodose2009
Collaborator
Collaborator

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.

0 Likes
Accepted solutions (1)
656 Views
3 Replies
Replies (3)
Message 2 of 4

Alexander.Rivilis
Mentor
Mentor

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) ?

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 3 of 4

diagodose2009
Collaborator
Collaborator
Accepted solution

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

Smiley Tongue

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]

 

0 Likes
Message 4 of 4

owenwengerd
Advisor
Advisor

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
0 Likes