付费下载
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、黑鹰黑鹰 专业的动画安全技术培训多抽出一分钟时间学习.让你的生命更加.今天就是来讲一个与网络有关系的 实例,者的 最基本实现者的 最基本原理就是 从站点上下来东西后 再运行用 C 与windows API 函数 来一起写一个根据这个基本原理,者首先来看下要用到的 两个 API 函数的 定义/ URLDownloadToFileHRESULT URLDownloadToFile( LPUNKNOWaller, LPCSTR szURL,LPCSTR szFileName,DWORD dwLPBINDS,USCALLBACK lpfnCB);Downloads bits from theernet
2、 and saves them to a file. The cnt can choose to benotified of progress through a notification callback.pCallerAddress of the controllingIUnknownerface of the calling ActiveX component (if the calleris an ActiveX component). If the calling application is not an ActiveX component, this valuecan be se
3、t to NULL. Otherwise, the caller is a COM objectt is contained in anothercomponent (such as an ActiveX control withhe context of an HTML page). This parameterrepresents the outermost IUnknown of the calling component. The function attempts thedownload withhe context of the ActiveX cnt framework and
4、allows the callers containerto receive callbacks on the progress of the download. szURLString containing the URL to be downloaded. Cannot be NULL.szFileNameString containing the name of the file to create for bits dwfor future use. Must be zero.lpfnCBt come from the download.Address of the callers I
5、BindSusCallbackerface. URLDownloadToFile calls thiserfaIBindSusCallback:OnProgress method on a connection activity, including thearrival of data. IBindSusCallback:OnDataAvailable is never called. ImplementingIBindSusCallback:OnProgress allows a caller to implement a usererface or otherprogress monit
6、oring functionality. It also allows the download operation to be canceled byreturning E_ABORT from the IBindSusCallback:OnProgress call. Can be NULL./ URLDownloadToFile 不支持断点续传./SExecuteHINSTANHWND hwnd,Execute(LPCTSTR lpOperation, LPCTSTR lpFile, LPCTSTR lpParameters, LPCTSTR lpDirectory,nShowCmd);
7、Opens or prs a specified file.Returns a value greatern 32 if sucsful, or an error valuet is lessn or equalto 32 otherwise. The following table lists the error values. The return value is cast as anHINSTANCE for backward compatibility with 16-bit Windows applications. 0The operatingsystem is out of m
8、emory or resour.ERROR_FILE_NOT_FOUNDThe specified file was not found.ERROR_PATH_NOT_FOUNDThe specified path was not found. ERROR_BAD_FORMATThe .exe file is invalid (non-Win32 .exe or error in .exe image).SE_ERR_ACSDENIEDThe operating system denied acs to the specified file.PLETEThe file name assotio
9、n isplete or invalid.SE_ERR_DDEBUSYThe DDE tranion could not be completed because other DDEtranionswere being prosed.SE_ERR_DDEFAILThe DDE tranion failed.SE_ERR_DDETIMEOUTThe DDE trantimed out.ion could not be completed because the requestSE_ERR_DLLNOTFOUNDThe specified dynamic-link library was not
10、found.SE_ERR_FNFThe specified file was not found.SE_ERR_NOASSOCThere is no application assoted with the given file name exten.SE_ERR_OOMThere was not enough memory to complete the operation. SE_ERR_PNFThe specified path was not found.SE_ERR_SHAREA sharing violation occurred.hwndWindow handle to a pa
11、rent window. This window receives any message boxest an applicationprodu. For exle, an application may report an error by producing a message box.lpOperationAddress of a null-terminated stringt specifies the operation to perform. The followingoperation strings are valid: openThe function opens the f
12、ile specified by the lpFileparameter. The file can be an executable file or afile. It cso be a folder.prThe function prs the file specified by lpFile. The file should be afile. If the file is an executable file, the function opens the file, as if open had beenspecified.exploreThe function explores t
13、he folder specified by lpFile.This parameter can be NULL.hat case, the function opens the file specified by lpFile.lpFileAddress of a null-terminated stringt specifies the file to open or pror the folder toopen or explore. The function can open an executable file or afile. The functioncan prafile.lp
14、ParametersIf the lpFile parameter specifies an executable file, lpParameters is an address to a null-terminated stringt specifies the parameters to be passed to the application.If lpFile specifies alpDirectoryfile, lpParameters should be NULL.Address of a null-terminated stringnShowCmdt specifies th
15、e defauirectory.If lpFile specifies an executable file, nShowCmd specifies how the application is to be shownwhen it is opened. This parameter can be one of the following values: SW_HIDEHides thewindow and activates another window.SW_IZEizes the specified window.SW_MINIMIZEMinimizes the specified wi
16、ndow and activates the next top-level windowzhe-order.SW_RESTOREActivates and displays the window. If the window is minimized orized,Windows restores it to its original size andition. An application should specify thisflag when restoring a minimized window.SW_SHOWActivates the window and displays it
17、 in its current size andition.SW_SHOWDEFAULTtheSTARTUPINFOSets the show se based on the SW_ flag specified instructure passed to theCreatePros function by the programt started the application. Anapplication should callShowWindow with this flag to set the initial show se of its mainwindow.SW_SHOWIZED
18、Activates the window and displays it as aized window.SW_SHOWMINIMIZEDActivates the window and displays it as a minimized window. SW_SHOWMINNOACTIVEDisplays the window as a minimized window. The active windowremainsactive.SW_SHOWNA Displays the window in its current se. The active window remainive.SW
19、_SHOWNOACTIVATEDisplays a window in its most recent size andwindowition. The activeremainive.SW_SHOWNORMALActivates and displays a window. If the window is minimizedized,orWindows restores it to its original size andition. An application should specify thisflag when displaying the window for thetime.If lpFile specifies afile, nShowCmd should be zero.You can use this function to open or explore a sfolder. To open a folder, use either ofthe following calls:SExecute(handle, NULL, path_to_folder, NULL, NULL, SW_SHOWNORMAL);orSExecute(handle, open, path_to_fo
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年河南测绘职业学院单招综合素质考试备考题库含详细答案解析
- 2026年山西青年职业学院单招职业技能考试备考试题含详细答案解析
- 2026年陕西能源职业技术学院高职单招职业适应性测试备考题库及答案详细解析
- 2026年湖南机电职业技术学院单招综合素质笔试备考题库含详细答案解析
- 2026年濮阳医学高等专科学校高职单招职业适应性测试备考试题及答案详细解析
- 2026年广东茂名农林科技职业学院单招职业技能考试备考试题含详细答案解析
- 2026年河北外国语学院单招综合素质笔试模拟试题含详细答案解析
- 2026年太原旅游职业学院单招职业技能考试模拟试题含详细答案解析
- 2026云南玉溪元江县消防救援大队招聘政府专职消防队员10人备考考试试题及答案解析
- 2026年赤峰工业职业技术学院单招综合素质考试备考题库含详细答案解析
- DB21-T 4279-2025 黑果腺肋花楸农业气象服务技术规程
- 2026广东广州市海珠区住房和建设局招聘雇员7人考试参考试题及答案解析
- 2026新疆伊犁州新源县总工会面向社会招聘工会社会工作者3人考试备考题库及答案解析
- 广东省汕头市2025-2026学年高三上学期期末语文试题(含答案)(含解析)
- 110接处警课件培训
- DB15∕T 385-2025 行业用水定额
- 火箭军教学课件
- 新媒体运营专员笔试考试题集含答案
- 护理不良事件之血标本采集错误分析与防控
- 心脏电生理检查操作标准流程
- 盾构构造与操作维护课件 2 盾构构造与操作维护课件-盾构刀盘刀具及回转中心
评论
0/150
提交评论