转至繁体中文版     | 网站首页 | 图文教程 | 资源下载 | 站长博客 | 图片素材 | 武汉seo | 武汉网站优化 | 
最新公告:     敏韬网|教学资源学习资料永久免费分享站!  [mintao  2008年9月2日]        
您现在的位置: 学习笔记 >> 图文教程 >> 软件开发 >> VB.NET程序 >> 正文
The COM Course - Part 3--By Karl Moore         ★★★★

The COM Course - Part 3--By Karl Moore

作者:闵涛 文章来源:闵涛的学习笔记 点击数:2274 更新时间:2009/4/23 16:38:17
VB-World - ActiveX Development - Articles - The COM Course - Part 3 - Compatibility
Search VB-World:         
> VBForums.com
> VBSquare.com
> VBAPI.com   Home  > ActiveX Development > Articles Email this page Printer Friendly More From Karl Post Feedback
Related
The COM Course - Part 3 The COM Course - Part 2 The COM Course - Part 1 ActiveX Control Tutorial - Part 5 ActiveX Control Tutorial - Part 4
Hot Picks
VB.NET Uncovered: Big Changes VB.NET Uncovered: Working the Web Control the Panel Kill Context Learn to Program with Visual Basic 6

The COM Course - Part 3

By Karl Moore

Compatibility

At the end of last week, we stumbled across a small problem. Well, rather a big problem actually.

In fact, if you''''ve got time, it was a whopping great huge problem wearing high heels, a frilly skirt and holding a massive sign stating "I am a BIG problem!".

You see - we compiled our ActiveX DLL, then compiled a test program that used our DLL. Then we recompiled our DLL ?something you usually do after you make changes. Suddenly, our test program no longer worked. Damn.

If we had then recompiled our test program, it would''''ve worked. But let''''s say your VB program, an Excel spreadsheet and one C++ accounts package all use your DLL. Do they all need to be ''''recompiled'''' every time you make a small change to your ActiveX DLL?

The answer is, thankfully, no.

The reason we experienced problems last week was due to an issue known as compatibility. Or rather, a lack of it.

  • Open up your Northwind project in Visual Basic
  • Click ''''Project'''', ''''Northwind Properties''''
  • Click the ''''Component'''' tab

Take a peek at the ''''Version Compatibility'''' frame in front of you. Here we have three options. Let''''s explain these now:

  • No Compatibility ?With every compile, your COM component gets assigned a new ''''signature''''. This means programs looking for older ''''signatures'''' (the previous version of the DLL) ?simply flop
  • Project Compatibility ?With every compile, your COM component is assigned a new signature ?and still, any using-applications still flop. The only change here is that ''''big'''' differences between your current project and a previous DLL project are highlighted as you compile. Ohhh, whoop-de-doo
  • Binary Compatibility ?When compiled, your application attempts to keep the signature of a previously compiled DLL, thus ensuring any applications using it don''''t magically turn into the Blue Screen of Death. However if the differences between your previously compiled DLL and your to-be-compiled DLL are too great, a new signature must be assigned

So let''''s test our theory:

  • Open last week''''s test application
  • Recompile it
  • Trial run your test application ?it should work
  • Open our ActiveX DLL project
  • Set the Binary Compatibility option
  • Recompile your DLL
  • Attempt to run your test application ?it should still work

Hurrah! It may sounds like complete hogwash, but when recompiling their DLLs, most developers get themselves into an awfully incompatible situation.

But hopefully you won''''t ?all thanks to this small aside.

Well, that''''s compatibility for you. About as exciting as www.PylonOfTheMonth.co.uk.

Introduction

ActiveX EXEs

[1] [2]  下一页


[聊天工具]Google Suggest十大妙用  [聊天工具]保驾护航Web迅雷 全新版本给你更多安全
[聊天工具]玩转火狐的Cookie 让火狐狸吃好小甜饼!  [聊天工具]P2P下载的好工具 POCO完全攻略
[聊天工具]横扫一切高价话费 Vbuzzer八分钱国际长途任你打  [聊天工具]众人拾柴火焰高 改进迅雷于不经意间 迅雷
[聊天工具]中英文互翻 Google Toolbar4中文版试用手记  [聊天工具]巧用µTorrent 体验国外下载站的乐趣
[聊天工具]可远程搜索桌面—Google Desktop 3全新体验  [聊天工具]腾讯浏览器 TT 之实用技巧荟萃 TT,技巧荟萃
教程录入:mintao    责任编辑:mintao 
  • 上一篇教程:

  • 下一篇教程:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      注:本站部分文章源于互联网,版权归原作者所有!如有侵权,请原作者与本站联系,本站将立即删除! 本站文章除特别注明外均可转载,但需注明出处! [MinTao学以致用网]
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

    同类栏目
    · C语言系列  · VB.NET程序
    · JAVA开发  · Delphi程序
    · 脚本语言
    更多内容
    热门推荐 更多内容
  • 没有教程
  • 赞助链接
    更多内容
    闵涛博文 更多关于武汉SEO的内容
    500 - 内部服务器错误。

    500 - 内部服务器错误。

    您查找的资源存在问题,因而无法显示。

    | 设为首页 |加入收藏 | 联系站长 | 友情链接 | 版权申明 | 广告服务
    MinTao学以致用网

    Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved.
    闵涛 投放广告、内容合作请Q我! E_mail:admin@mintao.net(欢迎提供学习资源)

    站长:MinTao ICP备案号:鄂ICP备11006601号-18

    闵涛站盟:医药大全-武穴网A打造BCD……
    咸宁网络警察报警平台