我的C ++代码,这是部分媒体基金会变换往往能够在Windows Store应用运行(地铁)
我修改C++ GrayscaleTransform
以包括下面的代码。
然而,我的C ++代码未能找到命名空间Windows::Storage
。
LPCWSTR zPath = Windows::Storage::ApplicationData::Current->TemporaryFolder->Path->Data();
是否有我需要做任何额外的设置吗?
我可以把它编译,通过打开消费的Windows运行时扩展 。
但是,这样做,它会给我更多的链接错误和警告。
warning LNK4197: export 'DllGetActivationFactory' specified multiple times; using first specification
warning LNK4197: export 'DllCanUnloadNow' specified multiple times; using first specification
warning LNK4197: export 'DllGetActivationFactory' specified multiple times; using first specification
warning LNK4197: export 'DllCanUnloadNow' specified multiple times; using first specification
error LNK2005: _DllCanUnloadNow@0 already defined in dllmain.obj
error LNK1169: one or more multiply defined symbols found
注释掉DllCanUnloadNow
会产生运行时错误。
我会在运行时休息
// GrayscaleTransform.dll!Microsoft::WRL::Details::ModuleBase::ModuleBase() Line 155 + 0x46 bytes C++
ModuleBase() throw()
{
#ifdef _DEBUG
// This indicates that there were two instances of the module created or race conditon during module creation
// If you are creating object with new/delete please make sure that you haven't created more than one module
// and you disabled static initalization with __WRL_DISABLE_STATIC_INITIALIZE__
// otherwise please initialize/create module in main()
__WRL_ASSERT__(::InterlockedCompareExchangePointer(reinterpret_cast<void* volatile*>(&module_), this, nullptr) == nullptr &&
"The module was already instantiated");
SRWLOCK initSRWLOCK = SRWLOCK_INIT;
__WRL_ASSERT__(reinterpret_cast<SRWLOCK*>(&moduleLock_)->Ptr == initSRWLOCK.Ptr && "Different value for moduleLock_ than SRWLOCK_INIT");
(initSRWLOCK);
#else
module_ = this;
#endif
}