none
vs2012 MFC中direct2d LoadLibraryExW(L"D2D1.dll",NULL, LOAD_LIBRARY_SEARCH_SYSTEM32)失败 RRS feed

  • 问题

  • afxrendertarget.cpp:

    BOOL _AFX_D2D_STATE::InitD2D(D2D1_FACTORY_TYPE d2dFactoryType, DWRITE_FACTORY_TYPE writeFactoryType) { if (m_bD2DInitialized) { return TRUE; } HRESULT hr = S_OK; if (!m_bComInitialized) { hr = CoInitialize(NULL); if (FAILED(hr)) { return FALSE; } m_bComInitialized = TRUE; } if ((m_hinstD2DDLL = ::AtlLoadSystemLibraryUsingFullPath(L"D2D1.dll")) == NULL) { return FALSE; }

    .....

    }

    AtlLoadSystemLibraryUsingFullPath

    调用LoadLibraryExW(pszLibrary, NULL, LOAD_LIBRARY_SEARCH_SYSTEM32)); 返回NULL;

    GetLastError() 返回 87;

    windows 7 未装sp1;

    2012年8月20日 13:59

答案

全部回复