您的位置:首页 > 其它

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

2008-08-19 15:10 701 查看
在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选项中->安全->受信任的站点中加入一个网站?
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: