在使用VS2005 + DXSDK9 + XP编译WebRTC出现dxguid.lib(dxguid.obj) : debugging informati问题的解决方法
来源:互联网 发布:退出淘宝客 鹊桥 编辑:程序博客网 时间:2024/06/03 17:37
在使用VS2005 + DXSDK9 + XP编译WebRTC出现
2>dxguid.lib(dxguid.obj) : fatal error LNK1103: debugging information corrupt; recompile module问题的解决方法
找到下面的文件\trunk\src\modules\video_render\main\source\windows\video_render_windows_impl.cc
找到函数void VideoRenderWindowsImpl::LogOSAndHardwareDetails()
改为如下,也就是注释掉,这个函数没有使用
该问题是由于#pragma comment(lib, "dxguid.lib")引起的,CLSID_DxDiagProvider包含在dxguid.lib里面,这个lib版本不兼容
void VideoRenderWindowsImpl::LogOSAndHardwareDetails()
{
MessageBox(NULL, _T("XXXX"), _T("*****"), MB_OK);
#if 1
HRESULT hr;
IDxDiagProvider* m_pDxDiagProvider = NULL;
IDxDiagContainer* m_pDxDiagRoot = NULL;
hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
bool coUninitializeIsRequired = true;
if (FAILED(hr))
{
// Avoid calling CoUninitialize() since CoInitializeEx() failed.
coUninitializeIsRequired = false;
if (hr == RPC_E_CHANGED_MODE)
{
// Calling thread has already initialized COM to be used in a single-threaded
// apartment (STA). We are then prevented from using STA.
// Details: hr = 0x80010106 <=> "Cannot change thread mode after it is set".
//
WEBRTC_TRACE(
kTraceWarning,
kTraceVideoRenderer,
_id,
"VideoRenderWindowsImpl::LogOSAndHardwareDetails() CoInitializeEx(NULL, COINIT_APARTMENTTHREADED) => RPC_E_CHANGED_MODE, error 0x%x",
hr);
}
}
hr = CoCreateInstance(CLSID_DxDiagProvider, NULL, CLSCTX_INPROC_SERVER,
IID_IDxDiagProvider, (LPVOID*) &m_pDxDiagProvider);
if (FAILED(hr) || m_pDxDiagProvider == NULL)
{
if (coUninitializeIsRequired)
CoUninitialize();
return;
}
// Fill out a DXDIAG_INIT_PARAMS struct and pass it to IDxDiagContainer::Initialize
// Passing in TRUE for bAllowWHQLChecks, allows dxdiag to check if drivers are
// digital signed as logo'd by WHQL which may connect via internet to update
// WHQL certificates.
DXDIAG_INIT_PARAMS dxDiagInitParam;
ZeroMemory(&dxDiagInitParam, sizeof(DXDIAG_INIT_PARAMS));
dxDiagInitParam.dwSize = sizeof(DXDIAG_INIT_PARAMS);
dxDiagInitParam.dwDxDiagHeaderVersion = DXDIAG_DX9_SDK_VERSION;
dxDiagInitParam.bAllowWHQLChecks = TRUE;
dxDiagInitParam.pReserved = NULL;
hr = m_pDxDiagProvider->Initialize(&dxDiagInitParam);
if (FAILED(hr))
{
m_pDxDiagProvider->Release();
if (coUninitializeIsRequired)
CoUninitialize();
return;
}
hr = m_pDxDiagProvider->GetRootContainer(&m_pDxDiagRoot);
if (FAILED(hr) || m_pDxDiagRoot == NULL)
{
m_pDxDiagProvider->Release();
if (coUninitializeIsRequired)
CoUninitialize();
return;
}
IDxDiagContainer* pObject = NULL;
hr = m_pDxDiagRoot->GetChildContainer(L"DxDiag_SystemInfo", &pObject);
if (FAILED(hr) || pObject == NULL)
{
m_pDxDiagRoot->Release();
m_pDxDiagProvider->Release();
if (coUninitializeIsRequired)
CoUninitialize();
return;
}
TCHAR m_szDirectXVersionLongEnglish[100];
TCHAR m_szOSLocalized[100];
TCHAR m_szProcessorEnglish[200];
TCHAR m_szSystemManufacturerEnglish[200];
ZeroMemory(m_szDirectXVersionLongEnglish, sizeof(TCHAR) * 100);
ZeroMemory(m_szOSLocalized, sizeof(TCHAR) * 100);
ZeroMemory(m_szProcessorEnglish, sizeof(TCHAR) * 200);
ZeroMemory(m_szSystemManufacturerEnglish, sizeof(TCHAR) * 200);
GetStringValue( pObject, L"szDirectXVersionLongEnglish",
EXPAND(m_szDirectXVersionLongEnglish) );
GetStringValue(pObject, L"szOSLocalized", EXPAND(m_szOSLocalized) );
GetStringValue(pObject, L"szProcessorEnglish", EXPAND(m_szProcessorEnglish) );
GetStringValue( pObject, L"szSystemManufacturerEnglish",
EXPAND(m_szSystemManufacturerEnglish) );
WEBRTC_TRACE(kTraceStateInfo, kTraceVideo, -1,
"System Manufacturer --- %s",
m_szSystemManufacturerEnglish);
WEBRTC_TRACE(kTraceStateInfo, kTraceVideo, -1,
"Processor --- %s", m_szProcessorEnglish);
WEBRTC_TRACE(kTraceStateInfo, kTraceVideo, -1,
"Operating System --- %s", m_szOSLocalized);
WEBRTC_TRACE(kTraceStateInfo, kTraceVideo, -1,
"DirectX Version --- %s",
m_szDirectXVersionLongEnglish);
if (pObject)
pObject->Release();
struct DisplayInfo
{
TCHAR m_szDescription[200];
TCHAR m_szManufacturer[200];
TCHAR m_szChipType[100];
TCHAR m_szDisplayMemoryEnglish[100];
TCHAR m_szDisplayModeEnglish[100];
TCHAR m_szDriverName[100];
TCHAR m_szDriverVersion[100];
TCHAR m_szDDStatusEnglish[100];
TCHAR m_szD3DStatusEnglish[100];
BOOL m_bDDAccelerationEnabled;
BOOL m_bNoHardware;
BOOL m_b3DAccelerationExists;
BOOL m_b3DAccelerationEnabled;
};
WCHAR wszContainer[256];
IDxDiagContainer* pContainer = NULL;
DWORD nInstanceCount = 0;
DWORD nItem = 0;
DWORD nCurCount = 0;
// Get the IDxDiagContainer object called "DxDiag_DisplayDevices".
// This call may take some time while dxdiag gathers the info.
if (FAILED(hr = m_pDxDiagRoot->GetChildContainer(L"DxDiag_DisplayDevices",
&pContainer)))
{
m_pDxDiagRoot->Release();
m_pDxDiagProvider->Release();
if (coUninitializeIsRequired)
CoUninitialize();
return;
}
if (FAILED(hr = pContainer->GetNumberOfChildContainers(&nInstanceCount)))
{
pContainer->Release();
m_pDxDiagRoot->Release();
m_pDxDiagProvider->Release();
if (coUninitializeIsRequired)
CoUninitialize();
return;
}
DisplayInfo *pDisplayInfo = new DisplayInfo;
if (pDisplayInfo == NULL)
return;
ZeroMemory(pDisplayInfo, sizeof(DisplayInfo));
hr = pContainer->EnumChildContainerNames(nItem, wszContainer, 256);
if (FAILED(hr))
{
delete pDisplayInfo;
pContainer->Release();
m_pDxDiagRoot->Release();
m_pDxDiagProvider->Release();
if (coUninitializeIsRequired)
CoUninitialize();
return;
}
hr = pContainer->GetChildContainer(wszContainer, &pObject);
if (FAILED(hr) || pObject == NULL)
{
delete pDisplayInfo;
pContainer->Release();
m_pDxDiagRoot->Release();
m_pDxDiagProvider->Release();
if (coUninitializeIsRequired)
CoUninitialize();
return;
}
GetStringValue( pObject, L"szDescription",
EXPAND(pDisplayInfo->m_szDescription) );
GetStringValue( pObject, L"szManufacturer",
EXPAND(pDisplayInfo->m_szManufacturer) );
GetStringValue(pObject, L"szChipType", EXPAND(pDisplayInfo->m_szChipType) );
GetStringValue( pObject, L"szDisplayMemoryEnglish",
EXPAND(pDisplayInfo->m_szDisplayMemoryEnglish) );
GetStringValue( pObject, L"szDisplayModeEnglish",
EXPAND(pDisplayInfo->m_szDisplayModeEnglish) );
GetStringValue( pObject, L"szDriverName",
EXPAND(pDisplayInfo->m_szDriverName) );
GetStringValue( pObject, L"szDriverVersion",
EXPAND(pDisplayInfo->m_szDriverVersion) );
GetBoolValue(pObject, L"bDDAccelerationEnabled",
&pDisplayInfo->m_bDDAccelerationEnabled);
GetBoolValue(pObject, L"bNoHardware", &pDisplayInfo->m_bNoHardware);
GetBoolValue(pObject, L"bDDAccelerationEnabled",
&pDisplayInfo->m_bDDAccelerationEnabled);
GetBoolValue(pObject, L"b3DAccelerationExists",
&pDisplayInfo->m_b3DAccelerationExists);
GetBoolValue(pObject, L"b3DAccelerationEnabled",
&pDisplayInfo->m_b3DAccelerationEnabled);
GetStringValue( pObject, L"szDDStatusEnglish",
EXPAND(pDisplayInfo->m_szDDStatusEnglish));
GetStringValue( pObject, L"szD3DStatusEnglish",
EXPAND(pDisplayInfo->m_szD3DStatusEnglish));
WEBRTC_TRACE(kTraceStateInfo, kTraceVideo, -1,
"Device Name --- %s",
pDisplayInfo->m_szDescription);
WEBRTC_TRACE(kTraceStateInfo, kTraceVideo, -1,
"Device Manufacturer --- %s",
pDisplayInfo->m_szManufacturer);
WEBRTC_TRACE(kTraceStateInfo, kTraceVideo, -1,
"Device ChipType --- %s",
pDisplayInfo->m_szChipType);
WEBRTC_TRACE(kTraceStateInfo, kTraceVideo, -1,
"Approx. Total Device Memory --- %s",
pDisplayInfo->m_szDisplayMemoryEnglish);
WEBRTC_TRACE(kTraceStateInfo, kTraceVideo, -1,
"Current Display Mode --- %s",
pDisplayInfo->m_szDisplayModeEnglish);
WEBRTC_TRACE(kTraceStateInfo, kTraceVideo, -1,
"Device Driver Name --- %s",
pDisplayInfo->m_szDriverName);
WEBRTC_TRACE(kTraceStateInfo, kTraceVideo, -1,
"Device Driver Version --- %s",
pDisplayInfo->m_szDriverVersion);
WEBRTC_TRACE(kTraceStateInfo, kTraceVideo, -1,
"DirectDraw Acceleration Enabled --- %s",
pDisplayInfo->m_szDescription ? "Enabled" : "Disabled");
WEBRTC_TRACE(kTraceStateInfo, kTraceVideo, -1,
"bNoHardware --- %s",
pDisplayInfo->m_bNoHardware ? "Enabled" : "Disabled");
WEBRTC_TRACE(kTraceStateInfo, kTraceVideo, -1,
"b3DAccelerationExists Enabled --- %s",
pDisplayInfo->m_b3DAccelerationExists ? "Enabled" : "Disabled");
WEBRTC_TRACE(kTraceStateInfo, kTraceVideo, -1,
"b3DAccelerationEnabled Enabled --- %s",
pDisplayInfo->m_b3DAccelerationEnabled ? "Enabled"
: "Disabled");
WEBRTC_TRACE(kTraceStateInfo, kTraceVideo, -1,
"DDraw Status --- %s",
pDisplayInfo->m_szDDStatusEnglish);
WEBRTC_TRACE(kTraceStateInfo, kTraceVideo, -1,
"D3D Status --- %s",
pDisplayInfo->m_szD3DStatusEnglish);
// Get OS version
OSVERSIONINFOEX osvie;
osvie.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
GetVersionEx((LPOSVERSIONINFO) & osvie);
/*
Operating system Version numberdwMajorVersion dwMinorVersion
Windows 7 6.1 6 1
Windows Server 2008 R2 6.1 6 1
Windows Server 2008 6.0 6 0
Windows Vista 6.0 6 0
Windows Server 2003 R2 5.2 5 2
Windows Server 2003 5.2 5 2
Windows XP 5.1 5 1
Windows 2000 5.0 5 0
*/
//RDP problem exists only when XP is involved
if (osvie.dwMajorVersion < 6)
{
WEBRTC_TRACE(kTraceStateInfo, kTraceVideoRenderer, _id,
"Checking for RDP driver");
if (_tcsncmp(pDisplayInfo->m_szDriverName, _T("RDPDD.dll"), 9) == 0)
{
//
}
}
if (pObject)
{
pObject->Release();
pObject = NULL;
}
if (pContainer)
pContainer->Release();
if (m_pDxDiagProvider)
m_pDxDiagProvider->Release();
if (m_pDxDiagRoot)
m_pDxDiagRoot->Release();
if (pDisplayInfo)
delete pDisplayInfo;
if (coUninitializeIsRequired)
CoUninitialize();
#endif
return;
}
- 在使用VS2005 + DXSDK9 + XP编译WebRTC出现dxguid.lib(dxguid.obj) : debugging informati问题的解决方法
- WebRTC在XP + VS2005 + Windows SDK 6.0环境的编译
- vs2005编译dxsdk9环境配置
- VS2005(VC6)出现如下链接错误的解决方法uafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsign
- DirectShow9在VS2005或vc6.0下编译出现问题的解决方法
- (转)DirectShow9在VS2005或vc6.0下编译出现问题的解决方法
- 在windows xp下使用dbca创建数据库过程中出现的问题及解决方法
- vs2005编译dll没有lib文件的解决方法
- vs2012 编译jsoncpp和使用jsoncpp lib出现的问题
- vs2012 编译jsoncpp和使用jsoncpp lib出现的问题
- VS2005链接问题: LNK2005错误 :error LNK2005: _free 已经在 libcmtd.lib(dbgheap.obj) 中定义
- VS2005链接问题: LNK2005错误 :error LNK2005: _free 已经在 libcmtd.lib(dbgheap.obj) 中定义
- GDI+在VS2005 编译不过的解决方法
- 用VS2005在Release配置下编译出现清单文件的错误的解决方法
- 在编译VS2005时出现的错误
- 在编译VS2005时出现的错误
- vs2005编译时优化出现的问题
- 使用qt编译webrtc遇到的问题。
- 文件的读取
- 《代码大全》阅读笔记____[第三章] 三思而后行:前期准备
- PPPoE工作原理与帧格式
- 逻辑三层ORM通用类库 ThreeLayerLib.dll v1.0
- CRecordset::IsBOF和CRecordset::IsEOF
- 在使用VS2005 + DXSDK9 + XP编译WebRTC出现dxguid.lib(dxguid.obj) : debugging informati问题的解决方法
- Asp.net 清除缓存
- java socket 传送字节流(前后台)
- what's REPL
- JSONObject的toBean 和 fromObject
- 从另一个方面看 Linq to Xml中的万圣节问题(迭代中的万圣节问题)
- 一个定制CFileDialog对话框的实例
- 抽象类
- as3版经典算法--快速排序算法(一)