解决C#调用DLL托管于非托管匹配的问题。
This commit is contained in:
+13
-4
@@ -49,13 +49,22 @@ namespace Sys
|
||||
SSI_STATUS_MACHINE_UNINITIALIZED,
|
||||
SSI_STATUS_UNKNOWN_ERROR
|
||||
};
|
||||
[DllImport("MachineInterfaceDll.dll")]
|
||||
[DllImport("MachineInterfaceDll.dll",CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern SSI_STATUS_MOTION Machine_Startup(bool bOfflineOnly, EHOME_MACHINE_MODE cHomeMachineMode);
|
||||
[DllImport("MachineInterfaceDll.dll")]
|
||||
|
||||
[DllImport("MachineInterfaceDll.dll", EntryPoint = "Machine_Shutdown",
|
||||
SetLastError = true, CharSet = CharSet.Unicode,
|
||||
ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern SSI_STATUS_MOTION Machine_Shutdown();
|
||||
[DllImport("MachineInterfaceDll.dll")]
|
||||
|
||||
[DllImport("MachineInterfaceDll.dll", EntryPoint = "Machine_GetDIO",
|
||||
SetLastError = true, CharSet = CharSet.Unicode,
|
||||
ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern SSI_STATUS_MOTION Machine_GetDIO(EIO_PORT Channel, ref Byte bDISts);
|
||||
[DllImport("MachineInterfaceDll.dll")]
|
||||
|
||||
[DllImport("MachineInterfaceDll.dll", EntryPoint = "Machine_SetDO",
|
||||
SetLastError = true, CharSet = CharSet.Unicode,
|
||||
ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern SSI_STATUS_MOTION Machine_SetDO(EIO_PORT Channel, Byte bDOSts);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user