shell扩展的例子,典型的例子是下面的应用
https://blog.csdn.net/gdruhv/article/details/83778647

这里面的代码是可以下载的,不过要50积分。
下周后,32位的可以编译过,但是64位的就编译不过了,提示下面这样的错误:

1>  ImportShellExt.cpp
1>D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include\atlcom.h(3448): error C2259: 'ATL::CComContainedObject<contained>': cannot instantiate abstract class
1>          with
1>              contained=CImportShellExt
1>  D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include\atlcom.h(3448): note: due to following members:
1>  D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include\atlcom.h(3448): note: 'HRESULT IContextMenu::GetCommandString(UINT_PTR,UINT,UINT *,CHAR *,UINT)': is abstract
1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\shobjidl.h(2767): note: see declaration of 'IContextMenu::GetCommandString'

很明显说的是函数HRESULT IContextMenu::GetCommandString(UINT_PTR,UINT,UINT *,CHAR ,UINT)没有实现,看下代码中的函数声明,如下所示:
STDMETHOD(GetCommandString)(UINT, UINT, UINT
, LPSTR, UINT);

仔细观察下,还真不一样,在于第一个参数UINT_PTR和UINT,64位编译的时候,这两个参数的定义是不一样的,其中UINT_PTR的定义如下:
typedef unsigned __int64 UINT_PTR, PUINT_PTR;
而UINT的定义如下:
typedef unsigned int UINT;
所以需要将STDMETHOD(GetCommandString)(UINT, UINT, UINT
, LPSTR, UINT);里面的UINT修改为UINT_PTR即可

virtual bool OnTaskStart() = 0; virtual void OnTaskStop() = 0; virtual void OnDealReportTask(CVorxProto* pTask) = 0; vi... <br />错误描述:<br />e:/mywork/1.7sp1/ginfo/client/src/skdesigner/dsgquerydlg.h(295) : error C2259: 'CDsgFormatDataMgrDlg' : cannot     instantiate abstract class due to following members:<br /> e:/mywork/1.7sp1/ginfo/client/src/skdesigner/dsgformatdatamgrdlg 根据具体情况不同,可能涉及到的类也可能不同,但是道理是一样的,之所以出现这样的错误呢,其实是因为,你继承的类的抽象方法没有在继承类中进行重写,比如在这里,我从CView类继承了一个类CTrlee类,但是我没有重写OnDraw函数,然后就进行了对CTrlee类的使用 virtual double Add(double DataA, double DataB) = 0; virtual double Min(double DataA, double DataB) = 0; virtual double Mul(double DataA, double DataB) = 0; virtua