One of the nice features added with Dynamics AX 2009 is the support for 64bit (x64) for the Dynamics AX 2009 Application Object Server and the Dynamics AX 2009 .NET Business Connector.
However when you have some existing X++ that you are now migrating to Dynamics AX 2009, you might run into an issue when you are using the DLLFunction kernel class and try to execute the code on a 64bit AOS.
When you are trying to use the DLLFunction kernel class on a 64bit AOS the execution of the method call will result in the following error message:
When you are executing exactly the same code on a 32bit AOS, the execution will work (assuming the parameters of the DLLFunction were set correctly).
Background of this issue is, that on 64bit the DLLFunction kernel class itself is not implemented in Dynamics AX 2009.
If you are in a situation where you need to make a call to an external WinAPI DLL, you need to look for alternatives: