When you write software, you often need to download files from the Internet (such as upgrading programs or getting program information, etc.). Generally speaking, we use the URLDownloadToFile function. The function prototype is as follows:
HRESULT URLDownloadToFile( LPUNKNOWN pCaller, LPCTSTR szURL, LPCTSTR szFileName, DWORD dwReserved, LPBINDSTATUSCALLBACK lpfnCB );
The three parameters pCaller, dwReserved and lpfnCB are not important, the most important is szURL (to download The file url address) and szFileName (file path and file name to be saved) these two parameters, this function is very convenient, in which language is relatively simple to call, but currently this function has been targeted by a variety of anti-virus software However, a program A that I wrote before will call the function and will be falsely reported by Rising. The reason is that too many downloader programs and Trojan software use this function to download virus files, although my program is harmless but always I was really uncomfortable when I was misreported. I checked msdn and found one. A similar function: URLDownloadToCacheFile, can achieve the same function, but since this function has many calls in IE itself, it will certainly not be killed by mistake. The prototype of this function is as follows:
HRESULT URLDownloadToCacheFile( LPUNKNOWN lpUnkcaller, LPCSTR szURL, LPTSTR szFileName, DWORD dwBufLength, DWORD dwReserved, IBindStatusCallback *pBSC );
is actually very similar to URLDownloadToFile, where the lpUnkcaller, dwReserved and *pBSC parameters can be unspecified, and the necessary parameters are szURL (the url address of the file to be downloaded), szFileName (the pointer to save the file name), dwBufLength (the length of the file name buffer), the function will download the file to the IE cache directory by default (see the function name can be thought of), szFileName Save the file path, you can directly get the szFileName open file when you call it.
Replace the URLDownloadToFile function with URLDownloadToCacheFile and compile the program A I mentioned before. Use VIRUSTOTAL to check the poison, and the false alarm phenomenon can be cancelled.
The author finds that many game users in the QQ game group established by the pla
You cant use software with your computer. Sometimes, we install a pie
In the process of using the software, sometimes we often use one of the small programs, such as the
For security reasons, we will add password protection for many files,
What is eprt file How to open eprt file
World of Warcraft minimum hardware configuration requirements and support graphics list
Teach you 8 practical tips to solve the big trouble of the game card machine
Non-destructive adjustment of disk partitions with PM
Commonly used search skills four
Win10 10550 can not receive how to do how to solve win10 10550 can not receive
Using SkyDrive to synchronize two Win7 computers to the folder
Pave the way for Win10 Universal, Microsoft stopped selling Kinect v2
Windows Server 2003 SP2 build IDS process details
Add or modify the English input method in Windows 10 to change it to the default input method
Orphan Process Group and Terminal Session Overview
Thumbnails do not display properly when browsing images or video files in win7
WinXP uses a third-party resource management tool to quickly create a file list