web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
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

I have the same question (0)
  • MG-16101311-0 Profile Picture
    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.

  • Nilotpal Cho Profile Picture
    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 

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Victoria Yudin Profile Picture

Victoria Yudin 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans