已经有N+1篇文章(源码)告诉你用winsock如何的下载文件,如何的多线程。
殊不知,一个API就能轻松搞定文件下载,兼容性也比winsock要好的多。
我们隆重介绍这个神奇的API,他就是URLDownloadToFile,一眼就能看出他是做什么的,看演示代码!
    网上铺天盖地的帖子都是说VB中loadresdata(),loadresstring(),……这些个函数的,完全都是说怎样在VB里头读取资源的事,我们都知道VB支持String,Icon,Cursor,BitMap,CUSTOM等几类Win32 标准资源。
   使用的时候用VB中的资源编辑器,将标准资源保存到其中,然后就是用前面提到的那几个函数变着戏法的调用,觉得这样很有意思似的。崩溃!
    我想解决的问题是如何向一个EXE文件中写入资源,或者把这个EXE文件中之前含有的标准资源替换掉,这个功能有点类似于资源修改工具,例如exeScope、ResHacker等,这个肯定要用到API的,查了一下,相关的API有:
BeginUpdateResource(),UpdateResource(),EndUpdateResource(),很好理解他们的功能,先打开资源文件句柄准备更新资源,更新资源,关闭句柄。

   一切似乎都已经解决了!

   其实,问题才刚刚开始,那就是不管我怎么调用这几个API,出来都不是我要的结果。
昨儿坐公车,途经一无名小站,经过一阵颠簸,车停了下来,忽然,报站器声音大作,曰:“公牛肚到了,下车的乘客就后门下”,当时偶一听,哟,还有这站???!!fear

便探头朝外张望,当时天暗,好不容易才看清“光荣路”,呜呼哎哉~中国的文字读音真是博大精深啊!


纯属闲聊。
'   (1) I have never used WS_SELECT (select), therefore I must warn that I do
'       not know if fd_set and timeval are properly defined.
'   (2) Alot of the functions are declared with "buf as any", when calling these
'       functions you may either pass strings, byte arrays or UDT's. For 32bit I
'       I recommend Byte arrays and the use of memcopy to copy the data back out
'   (3) The async functions (wsaAsync*) require the use of a message hook or
'       message window control to capture messages sent by the winsock stack. This
'       is not to be confused with a CallBack control, The only function that uses
'       callbacks is WSASetBlockingHook()
'   (4) Alot of "helper" functions are provided in the file for various things
'       before attempting to figure out how to call a function, look and see if
'       there is already a helper function for it.
'   (5) Data types (hostent etc) have kept there 16bit definitions, even under 32bit
'       windows due to the problem of them not working when redfined following the
'       suggested rules.
Tags: ,
一直都不能很清晰的知道啥是XHTML 1.0 标准,做页子也不知道怎么下手,只是胡乱的让DW去生成,唉,菜鸟就是我啦,今天总算有的小空闲,这不,百度了一下,呵呵就有了这些。不错,贴出来留着用~
Pages: 23/25 First page Previous page 18 19 20 21 22 23 24 25 Next page Final page [ View by Articles | List ]