Browse Source

接口程序修改

章政 7 years ago
parent
commit
2113c15961
2 changed files with 9 additions and 6 deletions
  1. 9 5
      UAS_MesInterface/MESHelper.cs
  2. 0 1
      UAS_MesInterface/Properties/AssemblyInfo.cs

+ 9 - 5
UAS_MesInterface/MESHelper.cs

@@ -7,14 +7,15 @@ using System.Text;
 
 namespace DllService
 {
+
     [Guid("99D0E96E-1058-415D-9874-D34537625284")]
-    [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
+    [InterfaceType(ComInterfaceType.InterfaceIsDual)]
     public interface IMESHelper
     {
         [DispId(10)]
         bool CheckRoutePassed(string iSN, string iResCode, out string oErrMessage);
         bool GetRcardMOInfo(string iSN, out string oMoCode, out string oErrMessage);
-        bool CheckUserAndResourcePassed(string iUserCode, string iResCode, string iPassWord,out string oErrMessage);
+        bool CheckUserAndResourcePassed(string iUserCode, string iResCode, string iPassWord, out string oErrMessage);
         bool GetAddressRangeByMO(string iSN, out string oWIFI, out string oBT, out string oCode1, out string oCode2, out string oCdoe3, out string oErrMessage);
         bool SetAddressInfo(string iSN, string iWIFI, string iBT, string iCode1, string iCode2, string iCode3, out string oErrorMessage);
         bool SetTestDetail(string iSN, string iClass, string iSubClass1, string iSubClass2, string iSubClass3, string iMaxValue, string iMinValue, string iActualValue, string iValue1, string iValue2, string iValue3, string iTestResult, string iResCode, out string oErrMessage);
@@ -24,9 +25,9 @@ namespace DllService
         bool SetMobileData(string iTSN, string iSN, string iSourceCode, string iMPKind, string iResult, string iErrCode, string flag, out string oErrorMessage);
     }
 
-    [Guid("DF5132FE-EED9-40DB-8B43-9AE63420BCB5")]
-    [ClassInterface(ClassInterfaceType.None)]
+    [Guid("41EAB546-6EF4-464A-895A-9C34013A5D8C")]
     [ComSourceInterfaces(typeof(IMESHelper))]
+    [ClassInterface(ClassInterfaceType.AutoDispatch)]
     [ProgId("DllService.MESHelper")]
     public class MESHelper : IMESHelper
     {
@@ -41,6 +42,9 @@ namespace DllService
         //用户选择的数据库的连接字符串
         private OracleCommand command = null;
 
+        [DllImport("User32.dll")]
+        public static extern int MessageBox(int h, string m, string c, int type);
+
         public MESHelper()
         {
 
@@ -93,7 +97,7 @@ namespace DllService
         /// <param name="iResCode"></param>
         /// <param name="oErrMessage"></param>
         /// <returns></returns>
-        public bool CheckUserAndResourcePassed(string iUserCode, string iResCode, string iPassWord,out string oErrMessage)
+        public bool CheckUserAndResourcePassed(string iUserCode, string iResCode, string iPassWord, out string oErrMessage)
         {
             oErrMessage = "";
             if (CheckUserLogin(iUserCode, iPassWord, out oErrMessage))

+ 0 - 1
UAS_MesInterface/Properties/AssemblyInfo.cs

@@ -1,5 +1,4 @@
 using System.Reflection;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
 // 有关程序集的一般信息由以下