关于在ActiveX中调用URLDownloadtoFile的问题, 第一个参数应该怎么填写呢

goldntman 2013-09-06 09:42:05
MSDN中说在ActiveX里调用的话,是不能传递NULL的,那这个pCaller应该怎么写?
...全文
631 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
wumn29 2013-09-29
  • 打赏
  • 举报
回复
反正是一个IUnknown*指针, 传入脚本引擎接口试一下 Activex里面可以获取到调用这个控件的脚本引擎接口指针的
真相重于对错 2013-09-07
  • 打赏
  • 举报
回复
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.
goldntman 2013-09-06
  • 打赏
  • 举报
回复
不行啊,失败,错误信息我还没看
oyljerry 2013-09-06
  • 打赏
  • 举报
回复
直接调用,如果有问题查看一下错误信息
zgl7903 2013-09-06
  • 打赏
  • 举报
回复
试试看

LPUNKNOWN pCaller = NULL;
URLDownloadToFile(pCaller,szURL,szFileName

3,245

社区成员

发帖
与我相关
我的任务
社区描述
ATL,Active Template Library活动(动态)模板库,是一种微软程序库,支持利用C++语言编写ASP代码以及其它ActiveX程序。
社区管理员
  • ATL/ActiveX/COM社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧