- UID
- 675574
- 积分
- 450
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2013-5-4
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2013-6-2 16:12:05
|
显示全部楼层
反应器我是用工具条添加的,MySelectFilter是这个反应器的文档级变量。
这是h文件
//-----------------------------------------------------------------------------
//----- SelectFilter.h : Declaration of the SelectFilter
//-----------------------------------------------------------------------------
#pragma once
#ifdef MY_MODULE
#define DLLIMPEXP __declspec(dllexport)
#else
//----- Note: we don't use __declspec(dllimport) here, because of the
//----- "local vtable" problem with msvc. If you use __declspec(dllimport),
//----- then, when a client dll does a new on the class, the object's
//----- vtable pointer points to a vtable allocated in that client
//----- dll. If the client dll then passes the object to another dll,
//----- and the client dll is then unloaded, the vtable becomes invalid
//----- and any virtual calls on the object will access invalid memory.
//-----
//----- By not using __declspec(dllimport), we guarantee that the
//----- vtable is allocated in the server dll during the ctor and the
//----- client dll does not overwrite the vtable pointer after calling
//----- the ctor. And, since we expect the server dll to remain in
这是CPP文件
//-----------------------------------------------------------------------------
//----- SelectFilter.cpp : Implementation of SelectFilter
//-----------------------------------------------------------------------------
#include "StdAfx.h"
#include "SelectFilter.h"
#include "DocData.h"
//-----------------------------------------------------------------------------
SelectFilter::SelectFilter (AcApDocument *pDoc,ACHAR *pname,resbuf *rb) : AcEdSSGetFilter ()
{
addFilterpname = NULL;
if (pname != NULL)
{
addFilterpname = new ACHAR(wcslen(pname));
wcscpy(addFilterpname,pname);
}
FilterRb = NULL;
if (rb != NULL)
{
|
|