AX调用.dll
1,将DLL拷贝到C:\Program Files (x86)\Microsoft Dynamics AX\50\Client\Bin
2,在AOT添加引用,在选择你拷贝的DLL,确定。//Accessibility
3,调用JOB如下
static void Job79(Args _args) { InteropPermission permission; ClassLibrary1.Class1 c = new ClassLibrary1.Class1(); ; try { permission = new InteropPermission(InteropKind::DllInterop); permission.assert(); print c.s(); } catch { error('Error executing DLL code'); } pause; }