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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

how to convert this AX code to Dex code

(0) ShareShare
ReportReport
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

I have the same question (0)
  • MG-16101311-0 Profile Picture
    26,225 on at

    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;

  • Nilotpal Cho Profile Picture
    255 on at

    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 

  • MG-16101311-0 Profile Picture
    26,225 on at

    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
    255 on at

    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

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans