I’ve being trying to use function Sys_GetConfigString from Toradex CE Lib 2.1 in C# with .NET Compact Framework 3.5 with Visual Studio 2008 to get Mac Address.
[DllImport("TdxAllLibrariesDll.dll")] public static extern bool Sys_GetConfigString(IntPtr hSys, string paramName, string pValue, UInt32 maxBytes);
I did everything to pre-allocate string for pValue but nothing works. Even changing lib to support StringBuilder instead of a string for pValue still doesn’t work.
string mac = new string('\0', 12); StringBuilder mac = new StringBuilder(12);
Am I missing something? Please, I need help on this. Function Sys_GetConfigInt works perfectly to get all parameters involved like BspVersion, EbootVersion, etc.