ライブラリから関数を呼び出して、マシンに関する情報を取得しようとしています。ただし、例外 SystemLoadException: Type IODBPSD_3 from GetAlmMsg, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null could not be read, there is an object on the 4th position, there is an object on the 4th position, there is an object on the 4th position, there is an object on the 4th position, there is an object on the 4th position, there is an object on the 4th position, there is an object on the 4th position, there is an object on the 4th position, there is an object on the 4th position, there is an object on the 4th position, there is an object on the 4th position, there is an object on the 4th position, there is an object on the 4th position, there is an object on the 4th position, there is an object on the 4th position, which is a object on the 4th position, which is a object at the wrong rounded or a unobject array.どうすればよいかアドバイスをお願いできますか?残念ながら、クラス IODBPSD_3 のロジックがまったくわかりません。助けてくれてありがとう。
ラデク
public Focas1.IODBPSD_3 prmData = new Focas1.IODBPSD_3();//my call
....
// マシンの FOCAS ライブラリへの添付ファイル - 私のコードではありません
public class Focas1
{
...
public const short MAX_AXIS = 8;
[StructLayout(LayoutKind.Explicit)]
public class IODBPSD_3
{
[ FieldOffset( 0 )]
public short datano ; /* data number */
[ FieldOffset( 2 )]
public short type ; /* axis number */
[ FieldOffset( 4 ),
MarshalAs(UnmanagedType.ByValArray,SizeConst=MAX_AXIS)]
public byte[] cdatas = new byte[MAX_AXIS];
[ FieldOffset( 4 ),
MarshalAs(UnmanagedType.ByValArray,SizeConst=MAX_AXIS)]
public short[] idatas = new short[MAX_AXIS];
[ FieldOffset( 4 ),
MarshalAs(UnmanagedType.ByValArray,SizeConst=MAX_AXIS)]
public int[] ldatas = new int[MAX_AXIS];
}
...
}