Pages

Contact

How to call M3 API from .NET

To call M3 API in .NET there are several options: 1) we can use Interop to wrap the COM unmanaged library, 2) we can use netmodules which were introduced in the M3 API Toolkit version 9.0.1.1, or 3) we can use the native .NET managed library which were introduced in the M3 API Toolkit version 9.0.3.0. I suggest the latter option.

Example

Download and install the M3 API Toolkit version 9.0.3.0 or later.

That version includes the .NET library MvxSockN.dll:

You can use .NET Reflector to introspect the assembly:

That version also includes documentation specifically for .NET:

That version also includes C# examples:

If you are using Microsoft Visual C# Express, add a New Reference to the DLL:

Hi Vincent. I don’t understand your question. But I invite you to read the developer’s guide that’s in the M3 API Toolkit. In the doc folder there’s a PDF that explains everything about the libraries, Java, ActiveX, .NET, etc. There you will get details about the methods, parameters, etc.

Hi Vincent, I cannot send you the API Toolkit as it’s copyrighted material of Infor. However, I can help you find the proper channel. I can also assist you via Infor Services. Send me an email to thib…@infor.com. /Thibaud

Hi Matthieu, it’s possible to include that library in a VB script, we do that often with Visual Basic for Applications (VBA) in Excel via the VBA via Tools > References. But I don’t know if or how to do it with SSIS. /Thibaud

I created a vb.net application using the MvxSockX_SRV.dll in a .net framework 4 environment. I am getting the error “Attempted to read or write protected memory. This is often an indication that other memory is corrupt” on the MvxSock.Access call. Any suggestions? Thanks.

Hi , I have a problem with the component, returns this message ” Microsoft.SqlServer.Dts.Pipeline.CannotCreateUserComponentException . . Unable to create the class of the user component Make sure your script has a class marked with SSISScriptComponentEntryPointAttribute ”
Thanks for help
Daniel

Hi Thibaud,
This problem is now solved. But when I run the component, I have this message “Impossible de charger le fichier ou l’assembly ‘Interop.MVXSOCKX_SVRLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’ ou une de ses dépendances’
I know that MVXSRVSOCKX_SRVLib is a COM component I am using with .NET code but I already imported System.Runtime.InteropServices which was generally able to make it work.
Regards Daniel

Daniel, I really don’t know. Some basic questions: Are you using the correct DLL for .NET? It should be the filename ending with N for .NET, MvxSockN.dll. Also, did you try the 64bit version, MvxSockNx64.dll, in case you have 64bit Windows? Also, do you have the version of the M3 API Toolkit that matches the M3 BE server?

Hi All,
Can you please mail me that .net DLL file because i have “MvxSockx64.dll” which i can’t able to use on .net as reference.
Can anyone please mail me the .net DLL files on “yogesh.malik@outlook.com”, it’s kinda urgent.

Hi Yogesh, the .NET version of the DLL contains the letter N, MvxSockNx64.dll. Also, we are not allowed to distribute Infor’s proprieaty software. You can download it from the Infor Xtreme downloads website. Otherwise, it’s in every M3 project installation. Otherwise, use the open source alternative from benmat on GitHub.

hi thibaudatwork,
I’ve already register to that site Xtreme downloads, but the site is i think under maintenance and i can’t login to that site.
I know you are not allow to distribute these kind of software, but actually i need that DLL urgent only .net DLL please share me only those .net DLL.

Scenario,
Actually i just want to built and application on .net through which i can upload the data from .net application to INFOR M3 by using M3 program and transaction.

Sorry. Urgency on your part doesn’t change the intellectual property laws. Did you try the open source alternative? Otherwise, to add data to M3 you don’t absolutely need that DLL, you can use the REST endpoint. You don’t need a DLL for that, just HTTP. Have you tried that?

So? Yogesh? Did you try my suggestions? Also, which company/customer is this project for? We can start there. Every customer has the M3 API Toolkit installed on the D: drive of the M3BE and/or MAK servers. Did you check again there?