在ActiveX中使用URLDownLoadToFile函数中的参数问题

在ActiveX中使用URLDownLoadToFile函数中的参数问题 AirLu(AirLu) Delphi VCL组件开发及应用 - delphi2007.net
http://www.delphi2007.net/DelphiVCL/html/delphi_2004050911041736277.html

在普通应用程序中这样写是正确的URLDownLoadToFile(nil,   PChar('http://xxx/a.zip),   PChar('c:\a.zip'),   0,   nil),但如果在编写activex控件中使用此函数时,第一个参数不能用nil,不知那位高手知道该怎么写。  
  以下是URLDownLoadToFile函数的参数说明:  
  Syntax  
   
  HRESULT   URLDownloadToFile(                      
          LPUNKNOWN   pCaller,  
          LPCTSTR   szURL,  
          LPCTSTR   szFileName,  
          DWORD   dwReserved,  
          LPBINDSTATUSCALLBACK   lpfnCB  
  );  
   
  Parameters  
   
  pCaller:  
      Pointer   to   the   controlling   IUnknown   interface   of   the   calling   Microsoft®   ActiveX®   component   (if   the   caller   is   an   ActiveX   component).   If   the   calling   application   is   not   an   ActiveX   component,   this   value   can   be   set   to   NULL.   Otherwise,   the   caller   is   a   Component   Object   Model   (COM)   object   that   is   contained   in   another   component   (such   as   an   ActiveX   control   within   the   context   of   an   HTML   page).   This   parameter   represents   the   outermost   IUnknown   of   the   calling   component.   The   function   attempts   the   download   within   the   context   of   the   ActiveX   client   framework   and   allows   the   caller's   container   to   receive   callbacks   on   the   progress   of   the   download.    
   
  szURL:  
      Pointer   to   a   string   value   containing   the   URL   to   be   downloaded.   Cannot   be   set   to   NULL.    
   
  szFileName:  
      Pointer   to   a   string   value   containing   the   name   of   the   file   to   create   for   bits   that   come   from   the   download.    
   
  dwReserved:  
      Reserved.   Must   be   set   to   0.  
   
  lpfnCB:  
      Pointer   to   the   caller's   IBindStatusCallback   interface.    
   
  其中第一个参数pCaller到底该怎么写?  
  请高手不吝赐教!

请教如何使用indy组件实现文件自动上传? 请问如何用IdHTTPServer实现文件自动上传? 使用spcomm进行串口通信的问题?急 各位大虾,有没有这样的控件,点击Combobox,下拉列表弹出的是一个TreeView 现在一Delphi动态库(没有类),如何用asp调用?(查到的资料基本是VB的Dll) 增加一个事件。可以再加分 数据显示问题,高手请进!谢谢 有谁见过这个VCL 一个关于数据显示的问题,高手请进! 请问如何用Delphi程序在Internet选项中->安全->受信任的站点中加入一个网站?

转载于:https://www.cnblogs.com/delphi2007/archive/2008/08/19/1271256.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值