转自:http://searchwindevelopment.techtarget.com/answer/Why-do-I-need-to-register-OCX-controls

 OCX's have to be registered due to the registry.  I realize that's a bit of a circular reference. OCX's are binary code that conforms to the Component Object Model (COM) programming model. The key tenant of COM is that they are only partially self-describing.

  When your program requests a COM object, it asks the Object Linking and Embedding (OLE) subsystem of the operating system for the object. OLE's job is to read the HKEY_CLASSES_ROOT key from the registry for the requested object. A Globally Unique Identifier (GUID), a 128-bit number, identifies the object itself. When an OCX registers itself, it declares it's GUID and where the OLE system can find that particular .OCX file. In essence, you can think of the registry as the translation layer.

  Since I can read minds, some of you are wondering what the difference is with .NET. Where a COM object is not self-describing, a .NET object is completely self-describing. Where a COM object has data in it's binary as well as the registry to describe it, a .NET object has every bit of information about itself inside the binary. (By the way, this information in .NET is called the meta-data.)

  With meta-data, anyone can load up a .NET object and using a technique called Reflection; you can find out exactly what methods and properties that object supports and call those methods and properties with the proper parameters. This works even if there are all sorts of custom data types and whatnot in the .NET object. With COM, the only way you can call unique methods on an object is to manually program them. The only way you can call methods and properties on a COM object is to have a priori knowledge those methods and properties and manually writing to code to call them.

为什么需要注册OCX控件?的更多相关文章

  1. Win7 64位系统 注册 ocx控件

    32位系统注册ocx就不谈了.网上一搜一大把.下面说下win7 64位 旗舰版下如果注册ocx控件    1.首先复制 XXXX.OCX文件到“C:\Windows\SysWOW64”目录. (XXX ...

  2. windows下注册ocx控件

    OCX 是对象类别扩充组件(Object Linking and Embedding (OLE) Control Extension):是可执行的文件的一种,但不可直接被执行: 是 ocx 控件的扩展 ...

  3. 在 浏览器中调用外接设备— —手写板 【win10 x64 手动注册ocx控件的方法】

    PPAXSignToolSDK.ocx 浏览器下使用手写板时调用的控件,使用前必须先注册,,不然浏览器下版本无法正常工作. ocx 控件在安装包运行时会自动注册,如果安装包没有注册成功,需要进行手动注 ...

  4. 在Windows7/8/10 64位操作系统下安装并注册ocx控件

    例如: 先网上下载一个MtbLine.ocx控件放入C:\Windows\SysWOW64\目录下 1.首先确保你的 Windows7 账户是管理员权限 2.下载MtbLine.ocx控件,网上可搜到 ...

  5. regsvr32 命令小集注册OCX控件,注册控件(包括十几个举例)

    Regsvr32 进程文件: regsvr32 or regsvr32.exe  进程名称: Microsoft DLL Registration Service  英文描述: regsvr32.ex ...

  6. 如何注册OCX控件

    32位系统: 将文件放到c:\windows\system目录 注册 运行:Regsvr32 c:\windows\system\xxx.ocx 取消注册运行:Regsvr32.exe /u c:\w ...

  7. FAQ:win7和win8 64位注册ocx控件方法

    win7/win8 问题所在: 64位的系统一般都是可以安装32位程序的, 执行         C:\Windows\SysWOW64\regsvr32.exe 而不是 C:\Windows\Sys ...

  8. C#注册OCX控件

    注意 COM组件注册到注册表中的位置,是CLSID还是TypeLib 注册方法 代码执行 //声明注册方法 [DllImport("C:\\Windows\\barcodex.ocx&quo ...

  9. VC++注册,卸载OCX控件,以及判断是否注册

    注册OCX控件 BOOL CYourClass::RegistOcx() { HINSTANCE hLib = LoadLibrary("NTGraph.ocx");      / ...

随机推荐

  1. idea 插件的使用 进阶篇(个人收集使用中的)

    idea 插件的使用 进阶篇(个人收集使用中的) 恭喜你,如果你已经看到这篇文章,证明在idear使用上已经初有小成!那么就要向着大神进发了! 下边就是大神之路! 插件的设置 在 IntelliJ I ...

  2. Solr之java操作

    参考教程: http://www.cnblogs.com/xia520pi/p/3625232.html http://www.cnblogs.com/hujunzheng/p/5647896.htm ...

  3. day2 查看文件目录命令:ls

    查看当前文件夹下面多有的目录文件ls 查看当前目录下面所有的文件,包括隐藏的文件ls -a(或者两个一样ls -all) 显示除"."和".."外的所有文件ls ...

  4. Synchronized和lock的区别和用法

    一.synchronized和lock的用法区别 (1)synchronized(隐式锁):在需要同步的对象中加入此控制,synchronized可以加在方法上,也可以加在特定代码块中,括号中表示需要 ...

  5. B. ZgukistringZ

    题目链接:http://codeforces.com/contest/551/problem/B 题目大意:给你三个字符串,s1,s2,s3.  s1任意两个字符串之间可以互相交换. 问,在s1中s2 ...

  6. Database学习 - mysql 数据库 数据操作

    mysql数据操作 查询语法 select * | field1,field1 ... from 表名 where 条件 group by 字段 having 筛选 order by 字段 limit ...

  7. slf4j的简单用法以及与log4j的区别

    之前在项目中用的日志记录器都是log4j的日志记录器,可是到了新公司发现都是slf4j,于是想着研究一下slf4j的用法. 注意:每次引入Logger的时候注意引入的jar包,因为有Logger的包太 ...

  8. shiroWeb项目-认证及MD5认证信息在页面显示(十)

    realm设置完整认证信息 // realm的认证方法,从数据库查询用户信息 @Override protected AuthenticationInfo doGetAuthenticationInf ...

  9. 攻击者利用的Windows命令、横向渗透工具分析结果列表

    横向渗透工具分析结果列表 https://jpcertcc.github.io/ToolAnalysisResultSheet/ 攻击者利用的Windows命令 https://blogs.jpcer ...

  10. python实战===教你用微信每天给女朋友说晚安

    但凡一件事,稍微有些重复.我就考虑怎么样用程序来实现它. 这里给各位程序员朋友分享如何每天给朋友定时微信发送”晚安“,故事,新闻,等等··· ···最好运行在服务器上,这样后台挂起来更方便. 准备: ...