Jiangsheng的CSDN Digest (Jan 7 2006)[1]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

CSDN 讨论总结系列:


可以让TWebBrowser只下载代码而不执行吗(Delphi 网络通信/分布式开发)


在用WebBrowser.Navigate打开一个网页后可否只让其下载网页的代码,而不执行并显示出来啊,要保证能用(WebBrowser.Document as IHTMLDocument2)调用网页的元素哦


不想显示网页,可以让WebBrowser1范围尽量小,放在按钮后就可以了。虽然这样看不到网页的显示了,但网页中的JS脚本还是会执行,有些还弹出广告窗口。只需要下载文件的话可以用URLDownloadToFile
只需要分析的话可以参考http://www.euromind.com/iedelphi/uilessparser.htm
也可以集成一个浏览器控件,在容器中处理DISPID_AMBIENT_DLCONTROL调用,返回DLCTL_DOWNLOADONLY标志,参考http://www.euromind.com/iedelphi/embeddedwb.htm。


递归开线程疑问(VC/MFC 进程/线程/DLL )


我用递归开线程,用下面的方法输出错误信息,结果是一堆“not enough space”错误
if(_beginthread(find_combination,0,(void*)p_my_data) == -1)
{
printf("strerror says open failed: %s\n", strerror(errno));
return;
}
问问,window里面一个进程理论上能开多少线程?


一个线程的开销包括:
内核模式下的开销(内核堆栈,对象管理所需内存)
用户模式下的开销(线程局部存储、线程环境块、堆栈、CRT、MFC、COM等等等等)

通常,线程数目的瓶颈在于线程自己的堆栈。Visual C++编译器默认设置是每个线程的堆栈大小是1兆。当然,如果你在创建线程时指定较小的堆栈大小,你应该可以创建较多的线程。

但是创建大量线程不是一个好的设计。每个线程创建和销毁的时候,Windows会调用已经加载的动态链接库的DLLMain,传递DLL_THREAD_ATTACH和DLL_THREAD_DETACH作为参数,除非动态库使用DisableThreadLibraryCalls禁用了这个通知。在创建大量线程的时候,这个开销是很大的。对于你这样的用后即弃的线程,你应该使用线程池。一个线程池示例可以在微软知识库找到(http://support.microsoft.com/support/kb/articles/Q197/7/28.asp)。


用 DirectShow 怎样生成 asf / wmv 的文件(VC/MFC 图形处理/算法)


graph 不能 run , 是不是 Asf Writer filter 的属性设置不对或不全 ?


DSCopy (DirectShow) Transcodes one or more files to an ASF file using the DirectShow® WM ASF Writer filter. The input file may be any compressed or uncompressed format supported by DirectShow.

DSPlay (DirectShow) This sample is an interactive audio/video media file player with DRM support. It uses DirectShow's WM ASF Reader filter to play Windows Media files (ASF, WMA, WMV) without DRM protection and files which use DRM at a level of 100 or below. See readme.txt in the sample's directory for more information.

DSSeekFm (DirectShow) This sample demonstrates how to use the DirectShow WM ASF Reader Filter to play ASF content in a DirectShow filter graph, and also how to use the frame seeking support in the Windows Media Format SDK.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmform95/htm/sampleapplications.asp
 


如何读取xml的version等信息(VC/MFC HTML/XML )


如何读取xml的version等信息

我想知道怎么用MSXML,读取一个xml文件的processing instruction

即<?xml version="1.0"?>中的version等信息的值

这些信息可以用createProcessingInstruction来写,为什么找不到读取的方法


That particular line of your file isn't part of the resulting DOM after
you parse the document. But the XML version and encoding used should
be. If I read correctly, the version and encoding strings there will be
available in DOM version 3, which is not currently implemented fully to
my knowledge by any XML parser. However, if you're using Xerces, it has
methods in the Document interface for retrieving those -- and the API
clearly states that it's experimental.

http://groups.google.com/group/comp.text.xml/browse_frm/thread/85c1481c1b0763f0/c2506bd9ce7742b9?lnk=st&q=read+xml+version&rnum=11&hl=en#c2506bd9ce7742b9


一块很古老的板卡,有驱动源程序*.asm,现在怎样用vc++编译这个驱动以及怎么在接下来的程序中调用呢?(其他开发语言 汇编语言 )


以前一个师兄用borlandC++4.0编写了一个程序,只有源程序了,我怎么编译也编译不出来,可能是windows版本的问题(据说可能只有windows3.1之流能够很好的兼容,我用xp装borlandC++4.0就痛苦了好长时间(用兼容方式装成功),但是编译怎么也通不过),所以现在我想重新写这个程序,完成了一点点,碰到一个严重问题:板卡的驱动问题,那个师兄留下了两个*.asm文件,就是板卡的驱动,但是怎么用VC++里面编译,并可以运行这两个*.asm文件呢?以及接下来怎样在程序中进行调用呢?

本文关键:Jiangsheng的CSDN Digest (Jan 7 2006)
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top