开发者

Failed Reference to IID_ICorProfilerInfo

开发者 https://www.devze.com 2023-03-28 15:35 出处:网络
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 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

精彩评论

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