Questions tagged [urlmon]

38 questions
12
votes
1 answer

urlmon.dll FindMimeFromData() works perfectly on 64bit desktop/console but generates errors on ASP.NET

I am creating a library of utilities to be used both in desktop environment in a web environment. It contains several features that I believe are often repeated in my applications, including utility to get the mime type of a file by its content (not…
T-moty
  • 2,679
  • 1
  • 26
  • 31
5
votes
1 answer

URLDownloadToFile and Authentication

I'm working on some old ATL OCX, that is used as "download manager". It downloads files using URLDownloadToFile API. Previously, it was hosted as ActiveX on web page so in case the server required authentication it was done by IE. Now it is part of…
Zaky
  • 369
  • 6
  • 21
5
votes
1 answer

How can I add an extra http header using IHTTPNegotiate?

How can I add an extra header to the request using IHTTPNegotiate? I added the interface but functions BeginningTransaction & OnResponse never get called. TNameSpaceHandler = class(TComObject, IInternetProtocol, IHttpNegotiate) ... function…
user1647411
4
votes
1 answer

Why does FindMimeFromData recognize image/tiff on one host, but doesn't on another one?

I'm using FindMimeFromData from urlmon.dll for sniffing uploaded files' MIME type. According to MIME Type Detection in Internet Explorer, image/tiff is one of the recognized MIME types. It works fine on my development machine (Windows 7 64bit, IE9),…
Jakub Januszkiewicz
  • 4,380
  • 2
  • 37
  • 54
4
votes
5 answers

Waiting for URLDownloadToFile() to end

I want to make the program that downloads page from internet and makes some parsing on it. Second part is easy, problem is first. I want to use URLDownloadToFile() function. But by default it doesn't wait for completing the download. MSDN says that…
Xirdus
  • 2,997
  • 6
  • 28
  • 36
4
votes
1 answer

Using and URLDownloadToFile to get HTTPS Web Resources

All, I am making a programming that will be able to download content from various websites on and off of my local network.To do this, I must use the libs and c++ for compatibility reasons. So far I have been able to successfully access a normal…
themaestro
  • 13,750
  • 20
  • 56
  • 75
3
votes
1 answer

"Attempted to read or write protected memory" caused by urlmon.dll

I know this has been asked many times but unfortunately I haven't find a solution to my problem, I'm using urlmon.dll to find the MIME type from array of bytes but I receive a crash by the IIS process w3wp.exe Attempted to read or write protected…
SVI
  • 921
  • 4
  • 11
  • 23
3
votes
0 answers

URLDownloadToFile() hangs forever when internet connection is severed

I'm using URLDownloadToFile() to download update files for my game. The function is synchronous, so I have it running in a separate thread, and I use a IBindStatusCallback (specifically the onProgress() function) to handle the progress bar, and…
Raptormeat
  • 312
  • 2
  • 14
2
votes
1 answer

Call to UrlMkGetSessionOption for URLMON_OPTION_USERAGENT always returns E_OUTOFMEMORY

However, it correctly fills up return string buffer(char*) for UserAgent String. URLMon.dll version : 11.0.20161.1000 - 64 bit. Platform Windows 10 64 bit.
hardeep
  • 186
  • 1
  • 7
2
votes
2 answers

How can I implement IServiceProvider?

How can I implement IServiceProvider in the class which I inherit other interfaces from so their methods actually get called? Right now I always get E_NOINTERFACE back from QueryInterface. TPassthrough = class(TComObject, IInternetProtocolRoot,…
John Lewis
  • 337
  • 3
  • 12
1
vote
1 answer

URLDownloadToFile fails with 0x800c0008 (INET_E_DOWNLOAD_FAILURE) depending on length of URL

I'm aware there is a similar question here. However my symptoms differ. There seems to be some kind of URL length restriction in place that I couldn't find documented. The limit seens to be 2084 (sic! not 2048!) characters in the URL. The easiest…
JBartlau
  • 772
  • 5
  • 23
1
vote
1 answer

Application pool crashes with URLMoniker urlmon.dll during MIME type checking

My application is ASP.NET MVC website deployed on Windows Server 2012 R2. I am using built-in Windows library URLMoniker - urlmon.dll to get MIME type of a file. I am passing its file path to GetMimeType method. Problem i am facing is, when I debug…
Akshay Raut
  • 413
  • 5
  • 19
1
vote
1 answer

pythoncom.CoCreateInstance can't create IZoneIdentifier; the interface is missing from registry too despite being documented in MSDN

I'm trying to implement Manipulating the zone identifier to specify where a file was download from – The Old New Thing - MSDN blogs in Python. At CoCreateInstance: pythoncom.CoCreateInstance( …
ivan_pozdeev
  • 33,874
  • 19
  • 107
  • 152
1
vote
1 answer

URLOpenPullStream and gzip content download - need uncompressed data

I am using URLOpenPullStream along with a IBindStatusCallback and IHttpNegotiate callbacks to handle the negotiate, status, and data messages. Problem that I have is when the content is gzip (e.g. Content-Encoding: gzip). The data that I am…
Ron
  • 978
  • 3
  • 13
  • 27
1
vote
1 answer

Download a file with URLDownloadToFile

I use URLDownloadToFile to download a file in Delphi. In the url there is not the real name of the file. Is it possible to specify just the path of the file, keeping the default name that i.e. Explorer show?
Alberto
  • 199
  • 2
  • 17
1
2 3