• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: | 推荐给好友 上一篇 | 下一篇

Developing COM Components using VC-ATL(2-7)

发布: 2007-7-01 20:40 | 作者: admin | 来源: | 查看: 13次 | 进入软件测试论坛讨论

领测软件测试网

十、MyProj_i.c

    代码选取


/* this file contains the actual definitions of */

/* the IIDs and CLSIDs */

/* link this file in with the server and any clients */

/* File created by MIDL compiler version 5.01.0164 */

/* at Sun Nov 30 23:39:23 2003

 */

/* Compiler settings for C:\MyProj\MyProj.idl:

    Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext

    error checks: allocation ref bounds_check enum stub_data

*/

//@@MIDL_FILE_HEADING(  )

#ifdef __cplusplus

extern "C"{

#endif

#ifndef __IID_DEFINED__

#define __IID_DEFINED__

typedef struct _IID

{

    unsigned long x;

    unsigned short s1;

    unsigned short s2;

    unsigned char  c[8];

} IID;

#endif // __IID_DEFINED__

#ifndef CLSID_DEFINED

#define CLSID_DEFINED

typedef IID CLSID;

#endif // CLSID_DEFINED

const IID IID_IMyCom = {0x65460F9C,0x3BAB,0x4055,{0x88,0x5A,0x8E,0xD5,0x9F,0x5F,0xA9,0xB0}};

const IID LIBID_MYPROJLib = {0xFE651184,0x11DE,0x4D01,{0xBD,0x69,0xB0,0x7D,0xDF,0xA1,0x2D,0x0C}};

const CLSID CLSID_MyCom = {0xFEB7BDEF,0xFB6F,0x446B,{0xBE,0x31,0xDF,0x0A,0x3A,0xD3,0x91,0xBA}};

#ifdef __cplusplus

}

#endif


 

十一、MyCom.rgs

    代码选取


HKCR

{

         MyProj.MyCom.1 = s ´MyCom Class´

         {

                   CLSID = s ´{FEB7BDEF-FB6F-446B-BE31-DF0A3AD391BA}´

         }

         MyProj.MyCom = s ´MyCom Class´

         {

                   CLSID = s ´{FEB7BDEF-FB6F-446B-BE31-DF0A3AD391BA}´

                   CurVer = s ´MyProj.MyCom.1´

         }

         NoRemove CLSID

         {

                   ForceRemove {FEB7BDEF-FB6F-446B-BE31-DF0A3AD391BA} = s ´MyCom Class´

                   {

                            ProgID = s ´MyProj.MyCom.1´

                            VersionIndependentProgID = s ´MyProj.MyCom´

                            ForceRemove ´Programmable´

                            InprocServer32 = s ´%MODULE%´

                            {

                                     val ThreadingModel = s ´Apartment´

                            }

                            ´TypeLib´ = s ´{FE651184-11DE-4D01-BD69-B07DDFA12D0C}´

                   }

         }

}


代码剖析

组件注册时用,在这里你可以更改组件的在注册时存放在注册表中的名称及组件的其他相关注册信息。

 

Developing COM Components using VC-ATL(2)完 


文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:info@testage.com.cn 电话:010-51297073

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网