在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選項中->安全->受信任的網站中加入一個網站?