Experience in creating an Axtivex

1.error PRJ0050: Failed to register output atl80.dll when building atl axtivex
  cause:because after the building, vs tring to register it, but the vc dlls are not there in the working directory, so command called by vc
 regsvr32 dllname got failed with that error.
2.do not build your dll into static lib when it reference system libs,
  for it may get conflict with other modules which reference the same system libs.
3.C Run-Time Error R6034
Error Message
An application has made an attempt to load the C runtime library without using a manifest. This is an unsupported way to load Visual C++ DLLs. You need to modify your application to build with a manifest. For more information, see the "Visual C++ Libraries as Shared Side-by-Side Assemblies" topic in the product documentation.
  resolution:
    1).Make sure the dependencies are of the right order.
    2).If it still does not work, you can make it a statis .lib other than .dll
Marked*   

   3).Make sure all the dependencies, especially the inderect system libs are added to make sure the right manifest info is embedded into the .dll. because if any system dll is missing, it won't create right embedded manifest into into the created .dll or exe.

    4) If it still not works, you can work around, the FAT32 -> yes. in the project configuration to make sure manifest generated for all projects

5. How to test a Axtivex in a html?

<HTML>
<HEAD>
<TITLE>ATL 8.0 test page for object atlstanctl</TITLE>
</HEAD>
<BODY>

<!--to ensure the control exists, if not a promption be popped up to
        notify the user that the control is to downloaded and installed-->
<OBJECT ID="atlstanctl" CLASSID="CLSID:8DF067AF-77AB-43CD-B3F5-AF9D9A2DD6E9"
                CODEBASE="E://workspace//axproj//atlstandardctl//Debug//atlstandardctl.dll"
                TYPE="application/x-itst-activex"
                width="10" 
          height="10" 
          align="center" 
          hspace="0" 
          vspace="0"  
        ></OBJECT>

<script LANGUAGE="javascript">
             // way 1), in conjaction with the <OBJECT ....> above.
       atlstanctl.Caption="caption123";
       alert(atlstanctl.Caption);
      
       // way 2), it work for composite activex too.
       //var obj = new ActiveXObject("atlstandardctl.atlstanctl");
       //obj.Caption = "caption31";
       //alert(obj.Caption);
</script>

</BODY>
</HTML>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值