Notes for Microsoft .NET Framework
When you use the Microsoft .NET Framework (hereafter, the ".NET environment") as your development platform, several structure and constant definitions differ from the native C/C++ interface.
Refer to the following API reference for the .NET-specific definitions.
API Reference
The .NET environment is supported on version 4.0 and later.
Structure Definitions
In the .NET environment, structures are implemented as value struct types. Member variables are converted to their C++/CLI equivalents, but the member names and overall structure definitions remain unchanged.
Some structures have additional handling as noted below.
- In the
StMPXCANVersionstructure (API version information), theAPIVersionmember is defined as a string, as shown below.
- In the
StMPXCANSlotstructure (frame information), theIncrementmember is defined as a 64-byteBytearray (byte addressing) instead of an 8-byteBytearray (bit addressing).
Using Visual Studio
When you use this SDK from C# or VB.NET, add a reference to the wrapper DLL listed below from your Visual Studio project.
| .NET environment | Wrapper DLL |
|---|---|
| Free edition (32-bit) | MPXCANFDCtrldotNET40Free.dll |
| Free edition (64-bit) | MPXCANFDCtrldotNET40Free_x64.dll |
| Licensed edition (32-bit) | MPXCANFDCtrldotNET40.dll |
| Licensed edition (64-bit) | MPXCANFDCtrldotNET40_x64.dll |
Example Configuration (Free Edition 32-bit)
Right-click References in your project > Add Reference > add MPXCANFDCtrldotNET40Free.dll in Reference Manager.
If you place the DLL information file (the file with the same name as the wrapper DLL but with the .xml extension) in the same folder as the wrapper DLL, API details appear in IntelliSense code completion.