开发者

Failed Reference to IID_ICorProfilerInfo

I am trying to开发者_开发知识库 build a custom .NET profiler using the Profiling API and I am having an issue with the references in the project. I am not a C++ engineer, so please bear with me.

I have created a simple COM server in Visual Studio 2010 in an ATL Server project. Everything builds fine, up until I add the code to query the interface that is being served:

HRESULT hr = pICorProfilerInfoUnk->QueryInterface( IID_ICorProfilerInfo,
                                               (void **)&m_pICorProfilerInfo );

In the head file, I am referencing the cor.h and the corprof.h header files, but I am missing something.

As a reference, I am using the code from this site Sample as a reference.

Any assistance would be appreciated and I realize this is probably obscure.

Thanks


You're probably missing the linkage to corguids.lib, which holds the actual definition of IID_ICorProfilerInfo (in corprof.h it's only declared as extern). In the sample you mention, see Building the Source Code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜