Beispiel #1
0
 public void testdll()
 {
     int ret = 0;
     LoadDll myDLD = new LoadDll();
     myDLD.LoadDll2("xxx.dll");
     myDLD.LoadFun("InitSDK");
     object[] Parameters = new object[] { };
     // 实参为0
     Type[] ParameterTypes = new Type[] { };
     // 实参类型为int
     ModePass[] themode = new ModePass[] { };
     // 传送方式为值传
     Type Type_Return = typeof(int);
     // 返回类型为int
     ret = (int)myDLD.Invoke(Parameters, ParameterTypes, themode, Type_Return);
     //txRet.Text = ret.ToString();
     if (ret != 1)
     {
         //MessageBox.Show("InitSDK failed !");
     }
     if (ret == 1)
     {
         //MessageBox.Show("InitSDK Sucessed !");
     }
 }
        public void testdll()
        {
            int     ret   = 0;
            LoadDll myDLD = new LoadDll();

            myDLD.LoadDll2("xxx.dll");
            myDLD.LoadFun("InitSDK");
            object[] Parameters = new object[] { };
            // 实参为0
            Type[] ParameterTypes = new Type[] { };
            // 实参类型为int
            ModePass[] themode = new ModePass[] { };
            // 传送方式为值传
            Type Type_Return = typeof(int);

            // 返回类型为int
            ret = (int)myDLD.Invoke(Parameters, ParameterTypes, themode, Type_Return);
            //txRet.Text = ret.ToString();
            if (ret != 1)
            {
                //MessageBox.Show("InitSDK failed !");
            }
            if (ret == 1)
            {
                //MessageBox.Show("InitSDK Sucessed !");
            }
        }