当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: Requirement:1.创建myCom.dll,该COM只
 

 

    摘要: sqlite简介: this is an extension for the sqlite embeddable sql database engine. sqlite is a c library that implements an embeddable sql database engine. programs that link with the sqlite library can ......
    摘要:   在cmainframe类中添加下列成员变量和成员函数(使用classwizard),下面是这些变量和函数的功能说明:  成员变量:  bool m_bfullscreen; //全屏幕显示标志  crect m_fullscreenwindowrect; //全屏幕显示窗口rect  windowplacement m_wpprev; //用于保存正常视图时的窗口位置信息  ctoolba......


COM组件的使用方法

requirement:

  igetresex--方法helloex() 【程序编程相关:简单的文本编辑器 - wxWindows

1.创建mycom.dll,该com只有一个组件,两个接口igetres--方法hello(), 【推荐阅读:Winsock2中WSAAsynSele

  #import "组件所在目录\mycom.dll" no_namespace 【扩展信息:最近做了个短期程序“百度MP3搜索”,把

2.在工程中导入组件或类型库

       或

  #import "类型库所在目录\mycom.tlb"

  using namespace mycom;

--method 1-------------------------------------------------------

  coinitialize(null);

  clsid clsid;

  clsidfromprogid(olestr("mycom.getres"),&clsid);

  ccomptr<igetres> pgetres;//智能指针

  pgetres.cocreateinstance(clsid);

  pgetres->hello();

  pgetres.release();//小心哦!!请看最后的“注意”

  couninitialize();

--method 2---------------------------------------------------------

  coinitialize(null);

  clsid clsid;

  hresult hr=clsidfromprogid(olestr("mycom.getres"),&clsid);

  igetres *ptr;

  hr=cocreateinstance(clsid,null,clsctx_inproc_server,

                __uuidof(igetres),(lpvoid*)&ptr);

  ptr->hello();

  couninitial
...   下一页
 ·c/c++中数组名的含义    »显示摘要«
    摘要: c/c++中的数组名是个很奇怪的东西,它到底代表什么呢? 对于char array[n](n是一个常数),大概有这么几种语义: <1> const char* <2> char [n] <3> char (&)[n] 举例如下(vc.net 7.1下编译): <1> char *p = array; // array表示const......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE