首页 Soft PlugIn RAN乱 Dev开发 Info资料 English WAP 留言 登陆 注册
-
Posted by Yippee | 评论(0) | 引用(0) | 阅读116次
20080725 c# directshow 2

20080725 c# directshow 2
http://www.shengfang.org

错误 1 error C2593: “operator ==”不明确 167 

错误 1 error LNK2001: 无法解析的外部符号 _IID_IMediaControl 


src_sf.exe 中的 0x0041335d 处未处理的异常: 0xC0000005: 读取位置 0x00000000 时发生访问冲突
在tools->option下的directory设置include的路径为SDK的路径,还包含project->settings->link下的object里输入Strmbase.lib   winmm.lib

http://hi.baidu.com/notepad519/blog/item/d8b75e2449441e044d088d08.html
error C2593: 'operator <<' is ambiguous  error C2679: binary '>>'


AfxMessageBox(_T("Can't realize the settings!"));

YES
因为你在建立工程的时候选用了UNICODE这一选项(默认的)
AfxMessageBox' : none of the 2 overloads could convert all the argument types
        d:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h(5025): could be 'int AfxMessageBox(LPCTSTR,UINT,UINT)'
        d:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h(5027): or 'int AfxMessageBox(UINT,UINT,UINT)'
        while trying to match the argument list '(const char [28], long)'

 默认情况程序:

void ChelloView::OnDraw(CDC* pDC)
{
ChellovcDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
if (!pDoc)
       return;
  
// TODO: 在此处为本机数据添加绘制代码
pDC->TextOutW (30,30,_T("hello"));

}

不钩选 Unicode 库(N) 前面的复选框的程序:

void ChelloView::OnDraw(CDC* pDC)
{
ChellovcDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
if (!pDoc)
       return;
  
// TODO: 在此处为本机数据添加绘制代码
pDC->TextOut(20,20,"hello!");
}


CString strFileName;
CFileDialog dlg( TRUE, NULL, NULL, OFN_ALLOWMULTISELECT, NULL, NULL );
DWORD MAXFILE = 2412; // allocate enough memory space
dlg.m_ofn.nMaxFile = MAXFILE; // set the buffer size
char* buf = new char[MAXFILE];
dlg.m_ofn.lpstrFile = buf;
dlg.m_ofn.lpstrFile[0] = NULL;

int iReturn = dlg.DoModal();
if(iReturn == IDOK)
{
POSITION pos = dlg.GetStartPosition();
while (pos != NULL)
{
strFileName=dlg.GetNextPathName(pos); // get the individual file name
// do some operations here
}
}
else if(iReturn == IDCANCEL) AfxMessageBox("Cancel");

delete [] buf;

The RenderFile() function returns a (0x80040216) error message for the following method:
hr = graph->RenderFile (filename,NULL);

It works fine if I hard code the path like
hr = graph->RenderFile (L"c:\\vmsencoding1\\movies\\stage\\10404.mpg", 0);

I tried to declare filename as  LPOLESTR ,LPCWSTR ,wchar_t*,
_TCHAR* and tried various castings too withourt any development.


字体:


Permanant URI永久地址 http://www.shengfang.org/blog/p/20080725cdirectshow2.php
Trackback URI引用地址 http://www.shengfang.org/blog/tb.php?tb_id=1237036537

2009年3月14日21:15星期六  [Info资料] 追踪此文的RSS
提示:
此文还没有评论。

称呼:    登陆   注册
   不注册,但记住我的信息
邮件:
(非必须)
评论: [UBB代码帮助]
粗体 斜体 下划线 链接 水平线 引用



验证码: 请输入你看见的数字
关闭UBB      提交时自动将内容复制到剪贴板

公告
Fire and Motion!

统计信息
[Yippee]||[统计]||日志:1887
在线: 20||用户: 2579 [列表]
今日:641||到访:2931359
Rss:||评论:1609

最新日志

最新评论

友情链接

日历
2008 - 08
     12
3456789
10111213141516
17181920212223
24252627282930
31      

最新引用

搜索

归档

杂项
Get RSS Feed (Version 2.0)
Get Atom Feed (Version 0.3)
编码:  UTF-8