资源简介

一个进程外com组件的回调例子。服务器端为进程外com组件,服务器端设定了定时器,每5秒钟调用一次客户端,客户端为基于CEditView的单文档程序。本例只是为回调机制做的一个最简单的例子,明白了回调过程,扩展为多客户端等就是很容易的事情了。

资源截图

代码片段和文件信息

// ComServerSample.cpp : WinMain 的实现

#include “stdafx.h“
#include “resource.h“
#include “ComServerSample.h“

class CComServerSampleModule : public CAtlExeModuleT< CComServerSampleModule >
{
public :
DECLARE_LIBID(LIBID_ComServerSampleLib)
DECLARE_REGISTRY_APPID_RESOURCEID(IDR_COMSERVERSAMPLE “{C1340A13-3715-4E8C-82B2-AEA3F3EA4AF0}“)
};

CComServerSampleModule _AtlModule;


//
extern “C“ int WINAPI _tWinMain(HINSTANCE /*hInstance*/ HINSTANCE /*hPrevInstance*/ 
                                LPTSTR /*lpCmdLine*/ int nShowCmd)
{
    return _AtlModule.WinMain(nShowCmd);
}


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2010-07-16 23:33  ComServerSample\
     目录           0  2010-07-16 22:40  ComServerSample\CallbackClient\
     文件       66300  2010-07-16 22:14  ComServerSample\CallbackClient\CallbackClient.aps
     文件        3703  2010-07-16 22:20  ComServerSample\CallbackClient\CallbackClient.cpp
     文件         630  2010-07-16 16:52  ComServerSample\CallbackClient\CallbackClient.h
     文件       10490  2010-07-16 22:14  ComServerSample\CallbackClient\CallbackClient.rc
     文件        5269  2010-07-16 21:32  ComServerSample\CallbackClient\CallbackClient.vcproj
     文件        1261  2010-07-16 16:36  ComServerSample\CallbackClient\CallbackClientDoc.cpp
     文件         594  2010-07-16 16:36  ComServerSample\CallbackClient\CallbackClientDoc.h
     文件        1963  2010-07-16 22:34  ComServerSample\CallbackClient\CallbackClientView.cpp
     文件         944  2010-07-16 22:14  ComServerSample\CallbackClient\CallbackClientView.h
     文件        1798  2010-07-16 19:04  ComServerSample\CallbackClient\MainFrm.cpp
     文件         656  2010-07-16 19:04  ComServerSample\CallbackClient\MainFrm.h
     文件        3413  2010-07-16 16:36  ComServerSample\CallbackClient\ReadMe.txt
     目录           0  2010-07-16 18:48  ComServerSample\CallbackClient\res\
     文件         639  2010-07-16 21:32  ComServerSample\CallbackClient\resource.h
     文件       21630  2003-04-01 19:36  ComServerSample\CallbackClient\res\CallbackClient.ico
     文件         703  2010-07-16 16:36  ComServerSample\CallbackClient\res\CallbackClient.manifest
     文件         370  2010-07-16 16:36  ComServerSample\CallbackClient\res\CallbackClient.rc2
     文件        1078  2003-04-01 19:36  ComServerSample\CallbackClient\res\CallbackClientDoc.ico
     文件        1078  2003-04-01 19:36  ComServerSample\CallbackClient\res\Toolbar.bmp
     文件         619  2010-07-16 22:24  ComServerSample\CallbackClient\Sink.cpp
     文件         478  2010-07-16 22:27  ComServerSample\CallbackClient\Sink.h
     文件         143  2010-07-16 16:36  ComServerSample\CallbackClient\stdafx.cpp
     文件        1528  2010-07-16 16:58  ComServerSample\CallbackClient\stdafx.h
     文件        4288  2010-07-16 16:05  ComServerSample\ComServerSample.aps
     文件         610  2010-07-16 16:03  ComServerSample\ComServerSample.cpp
     文件        8276  2010-07-16 22:10  ComServerSample\ComServerSample.h
     文件        1139  2010-07-16 22:06  ComServerSample\ComServerSample.idl
     文件      117760  2010-07-16 23:33  ComServerSample\ComServerSample.ncb
     文件        2869  2010-07-16 16:05  ComServerSample\ComServerSample.rc
............此处省略19个文件信息

评论

共有 条评论