Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Calling a function from com dll to dexterity

(0) ShareShare
ReportReport
Posted on by 255

i have registered a COM DLL (compiled in .net 3.5) as ,

1)regasm ABC.dll

2)regasm ABC.dll / regfile:ABC.reg

3)regasm ABC.dll /tlb:ABC.tlb

i want to call a function from the DLL to my Dexterity application .(same code in AX is given bellow)

A dll is getting called in AX as,

------------------------------------------------------------------START---- 

x=7; 

dll winapidll=new dll("ABC.dll");

dllfunction function=new dllfunction(WinApiDLL,'_Distributeamount@40');

Function.args(extTypes::DWord,extTypes::String,extTypes::String,extTypes::String,extTypes::String,extTypes::Double,

                   extTypes::String,extTypes::String,extTypes::String );

Function.returns(extTypes::DWord);

x=Function.call(this.hwnd(),prm1,prm2,prm3,prm4,prm5,prm6,prm7,prm8);

this.bold(1);

return x;

---------------------END------------------

how can i use the same function in dexterity.Help me to solve this.

regards,

*This post is locked for comments

  • Nilotpal Cho Profile Picture
    Nilotpal Cho 255 on at
    Re:Calling a function from com dll to dexterity

    hi Gomez,

    thanks a lot,

    i am able to execute it,but in  my case there is a .cpp file in the dll, which is having mathod as, 

    (method is not under any class)

    -----

    #include files.....

    CwinApp app;

    ////Exported functions

    extern "C" _(dllexport)

    BOOL CALLBACK Distributeamount(Param..,.,.,.,.,.)

     {

     //body of the function

    }

    -----

     same function is used in AX also as i shown.but i am facing problem in calling the function DEX. 

    after registering DLL  do i need to check it in the windows\assembly folder also?

    regards,

    nilotpal 

     

  • Mariano Gomez Profile Picture
    Mariano Gomez 26,225 on at
    Re: Calling a function from com dll to dexterity

    Nilo,

    You asked this same question a few weeks aback. This time take a look at my article Building a COM Interop Assembly to use with Microsoft Dexterity for more information.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans