Click here to Skip to main content
15,900,110 members

Comments by Member 14155986 (Top 4 by date)

Member 14155986 9-Oct-21 7:34am View    
Ah, well this works for Firefox (not surprising) but I have a problem with Chrome and Edge. These two use the wide format, so I register clipboard format "FileGroupDescriptorW" which gives me the file descriptor, but I cannot seem to read the file. IsDataAvailable(CF_FILECONTENTS) returns true, but GetData fails for types TYMED_ISTORAGE, TYMED_ISTREAM, TYMED_HGLOBAL and TYMED_FILE. Also QueryGetData fails for each of these types.

How do I retrieve the file contents from Chrome or edge?
Member 14155986 7-Oct-21 5:16am View    
Another issue: The browser may have cookies and/or login info. If I try to read some pages, I do not get the same page because I do not have those cookies. Is it feasible to exactly mimic Firefox, Edge and Chrome to parse their cookies and retrieve exactly the page the user is pointing to?
Member 14155986 7-Oct-21 5:05am View    
Thank you for this. If I can't find out what I am looking for, I can use this method to get an icon for the web page and also the page title. This will still not give me the path to the already cached icon, and I don't think it it worth searching the cache to match the icon file.

To be clear, I can load a web page in my browser, then disconnect the computer from the internet, then drag from the address bar onto the desktop, and Windows will create a .URL file there that looks like this:
[InternetShortcut]
URL=https://www.amazon.com/
IDList=
HotKey=0
IconFile=C:\Users\User\AppData\Local\Mozilla\Firefox\Profiles\am00k2ao.default-release\shortcutCache\K00ILysCaEq8+bEqV_3nuw==.ico
IconIndex=0

The name of the file is the title of the web page with ".URL" appended.

This tells me that there is some communication between the browser and Windows that tells it not only the URL but the path to the cached icon file and the page title. I have only seen documentation on how to drop the URL onto my program, I would like to know how to drop these other two pieces of information on my program.
Member 14155986 5-Oct-21 3:39am View    
I tried the viewer you suggest. It does not show anything when I drag a link from a browser. It does not show the contents of UniformResourceLocator, for example.