Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

how to convert this AX code to Dex code

Posted on by 255

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

I need to call this DLL in Dexterity.

Can anyone help me with this?

Thanks,

Nilotpal 

 

*This post is locked for comments

  • Nilotpal Cho Profile Picture
    Nilotpal Cho 255 on at
    Re: Re: how to convert this AX code to Dex code

    thanks Gomez,

    i Placed the DLL in system32 folder. When i try to register the ABC.dll with regsvr32 i get the error as "The module ' DLL name' was loaded but the entry point DllRegisterServer was not found. "

    how can i register that? 

    regards,

    NIlotpal

  • Mariano Gomez Profile Picture
    Mariano Gomez 26,225 on at
    Re: how to convert this AX code to Dex code

    I am not sure if all your DLLs are loaded in Windows\System32, if not, then your DLLs will need to be registered (regsvr32.exe) before they main DLL (ABC.dll) can "see" them. Also, you will need to verify that ABC.dll is registered.

  • Nilotpal Cho Profile Picture
    Nilotpal Cho 255 on at
    how to convert this AX code to Dex code

    thanks Gomez,

    but i am getting the "Clould not call external .dll..   "error.Basically this function "DistributeAmount "  will open a window of a different application(say, DFG ).

    This dll is interlinked with other DLL which are in the path "c:\program files\DFG".So,this ABC.dll is like the gateway to all the dll`s of that application(DFG).

    Please  let me know about your ideas to solve this.

    thanks,

    nilotpal 

  • Mariano Gomez Profile Picture
    Mariano Gomez 26,225 on at
    Re: how to convert this AX code to Dex code

    function returns long; 
    local string param1, param2, param3, param4, param5, param6, param7, param8;
    local long x;
    extern '_DistributeAmount@ABC.dll', x, param1, param2, param3, param4, param5, param6, param7, param8;
    return x;

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 Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans