吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 2289|回复: 2
收起左侧

[会员申请] 申请会员ID:516crazy

[复制链接]
吾爱游客  发表于 2016-2-17 11:16
1、申 请 I D:516crazy
2、个人邮箱:86545816@qq.com

3、原创技术文章:自己写的代码
自己写activex的部分代码,IObjectSafety是公用的,自己的只是粘了一部分反射代码。


    [Guid("DB5070BA-520E-42F6-8514-612901CD346D")]
    public partial class AttachmentControl : UserControl, IObjectSafety
    {

public AttachmentControl()
        {
            InitializeComponent();
        }


#region IObjectSafety 成员

        private const string _IID_IDispatch = "{00020400-0000-0000-C000-000000000046}";
        private const string _IID_IDispatchEx = "{a6ef9860-c720-11d0-9337-00a0c90dcaa9}";
        private const string _IID_IPersistStorage = "{0000010A-0000-0000-C000-000000000046}";
        private const string _IID_IPersistStream = "{00000109-0000-0000-C000-000000000046}";
        private const string _IID_IPersistPropertyBag = "{37D84F60-42CB-11CE-8135-00AA004BB851}";

        private const int INTERFACESAFE_FOR_UNTRUSTED_CALLER = 0x00000001;
        private const int INTERFACESAFE_FOR_UNTRUSTED_DATA = 0x00000002;
        private const int S_OK = 0;
        private const int E_FAIL = unchecked((int)0x80004005);
        private const int E_NOINTERFACE = unchecked((int)0x80004002);

        private bool _fSafeForScripting = true;
        private bool _fSafeForInitializing = true;



        public int GetInterfaceSafetyOptions(ref Guid riid, ref int pdwSupportedOptions, ref int pdwEnabledOptions)
        {。。。}


        public int SetInterfaceSafetyOptions(ref Guid riid, int dwOptionSetMask, int dwEnabledOptions)
        {。。。}
        #endregion


    public Form CreateObjectDock(string classNamespace, string className)
        {
            object obj = null;

            try
            {
                //Assembly assembly = Assembly.Load(classNamespace);

                ////从程序集中获取指定对象类型;
                //Type type = assembly.GetType(classNamespace + "." + className);

                //BandWay.DataManagement.PCS.ProjectServiceClient PCSClient = new BandWay.DataManagement.PCS.ProjectServiceClient(binding, new EndpointAddress("*****/PCDB/PC/"));
                //BandWay.DataManagement.FLS.FileServiceClient FLSClient = new BandWay.DataManagement.FLS.FileServiceClient(binding, new EndpointAddress("*****/FLDB/File/"));
                //BandWay.DataManagement.FLS.FileDownModel FLSModel = new BandWay.DataManagement.FLS.FileDownModel();
                //obj = Activator.CreateInstance(type);

                //System.Reflection.PropertyInfo propertyInfo = type.GetProperty("DBName");
                //System.Reflection.PropertyInfo propertyInfo1 = type.GetProperty("FID");
                //System.Reflection.PropertyInfo propertyInfo2 = type.GetProperty("WID");
                //System.Reflection.PropertyInfo propertyInfo6 = type.GetProperty("PCSClient");
                //propertyInfo.SetValue(obj, DBName, null);
                //propertyInfo1.SetValue(obj, strFlowID, null);
                //propertyInfo2.SetValue(obj, WorkID, null);
                //propertyInfo6.SetValue(obj, PCSClient, null);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }

            return (Form)obj;
        }

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

Hmily 发表于 2016-2-17 16:02
抱歉,未达到申请要求,可以关注论坛微信账号(吾爱破解论坛),开放注册会通知,到时候来注册。
BlackConsole 发表于 2016-2-18 16:00
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-5-4 11:27

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表