Download using InternetReadFile() creates cache file.

Hi! I need some help with WinInet library.
I found that files copied from internet using InternetReadFile() writes to C: drive and then to my desired location on other disk.
I want to download files directly on X: drive. Is there any possible way to ignore C: drive?
Code I`m using below, its no so pretty but it works.
Thanks for any reply.
#include <iostream>
#include <Windows.h>
#include <WinInet.h>
#include <fstream>
#pragma comment(lib, "Wininet.lib")
HINTERNET hhint;
HINTERNET hSession;
int main()
    hhint = InternetOpenA("My favourite app", INTERNET_OPEN_TYPE_DIRECT, 0, 0, 0);
    hSession = InternetOpenUrlA(hhint, "http://vimeo.com/80389028/download?t=1420542143&v=207989974&s=d0a241f838fda4b2d77474993a478084", 0, 0, 0, 0);
    const size_t size = 1024;
    char Buffer[size];
    DWORD dSize = 0 ;
    std::ofstream outdata("X:\\Download\\solea.mp4", std::ios::binary);
        while(InternetReadFile(hSession, Buffer, size, &dSize))
            if (!dSize)
                break;
            outdata.write(Buffer, size);
    outdata.close();
    InternetCloseHandle(hhint);
    InternetCloseHandle(hSession);
    return int();

WinInet does, too, by default automatically save any data it downloads to a browser cache.
Igor Tandetnik
Thanks i almost forget this .And yes you are right usually we use INTERNET_FLAG_DONT_CACHE | INTERNET_FLAG_PRAGMA_NOCACHE |INTERNET_FLAG_NO_CACHE_WRITE .
Thanks
Rupesh Shukla

Similar Messages

  • JRE7 throws exception Can't create cache file but work fine with JRE6

    I am using J-free chart for rendering charts. My application is work fine with JRE6 but while using JRE7 i am getting following exception
    Caused by: javax.imageio.IIOException: Can't create cache file!
         at javax.imageio.ImageIO.createImageOutputStream(Unknown Source)
         ... 18 more
    Caused by: java.io.IOException: The system cannot find the path specified
         at java.io.WinNTFileSystem.createFileExclusively(Native Method)
         at java.io.File.createTempFile(Unknown Source)
         at javax.imageio.stream.FileCacheImageOutputStream.<init>(Unknown Source)
         at com.sun.imageio.spi.OutputStreamImageOutputStreamSpi.createOutputStreamInstance(Unknown Source)
         ... 19 more

    I was not able to reproduce this with Java 7u3 (32bit) on a Windows 7 (32bit).
    What specific version of Java were you using at the time of error?
    - ShakR

  • ALV truncation while download using  List--Save/send--File--Spread sheet

    Experts,
    In ALV output, I am trying to download using menu item
    "List --> Save/send  --> File --> Spread sheet" then in the popup appears
    here if i GIVE the FILE NAME THEN,material number is getting truncated.
    If I don't give any file name it is storing as ".xls" and not getting truncated.
    How to correct this or avoid this truncation.
    OR
    If we can't do correction about truncation ...my function consultant is asking to
    to disable "List --> Save/send  --> File".
    Thanks in advance.
    Sam

    Solved by my own....
    We need to pass
    i_fieldcat-no_zero = 'X'.
    so that the zeros at the end  won't get truncated.

  • How to Use or Create XSD files in Crystal Reports XI R2 designer

    Hi,
    I have a crystal reports  application which was developed using  .Net crystal report designer, where XSD is used .
    now we have to develop the same application using Crystal Reports XI R2 designer , here i could not find any option for creating or using  XSD files , can you give any suggestions on that
    regards,
    kathyaini

    Hi Kathayini,
    Thanks for your prompt reply.
    We can use the existing XSD which are present in .Net
    But with current versions of crystal we doesn't have the feature to create XSD files at crystal designer level.
    So, it is suggested to use the XSD files which are present in .Net and  can also create new  XSD files.
    Let me know if you have any further queries.
    Regards,
    Naveen.

  • How to use Open/Create/Replace File.vi

    How to change Open/Create/Replace File.vi to Open File?

    Use the routine Write Characters to File.vi found under the File IO palette. It has a boolean control on the front panel. If this is set true, data is appended to the end of an existing file, or a new one is created if the file doesn't exist. If the control is set to false, the file is always created new--overwriting any existing file with the same name.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Dreamweaver fails to create cache file

    I have reinstalled Dreamweaver 8 and my main site fails to
    create a site cache file. I am running windows xp fully updated. My
    other sites can create a cache file with no difficulty. I can
    create and destroy files within the sitecache directory. The file
    appears when the error mesage is displayed but disappears as soon
    as the error dialog is acknowledged.
    Any thoughts?

    quote:
    Originally posted by:
    Newsgroup User
    Do you have the cache enabled in your Site definition?
    HTH,
    Randy
    > I have reinstalled Dreamweaver 8 and my main site fails
    to create a site cache
    > file. I am running windows xp fully updated. My other
    sites can create a
    > cache file with no difficulty. I can create and destroy
    files within the
    > sitecache directory. The file appears when the error
    mesage is displayed but
    > disappears as soon as the error dialog is acknowledged.

  • Adobe Acrobat install not creating cached files

    Greetings,
    We have used the Customization Wizard to create the Adobe Acrobat Pro (8.x and XI/11.0.2)
    We DID select the option to:
    Enable caching of installer files on local hard drive
    The problem is that the cache directory that Adobe says it should create/populate, does not happen.
    The Adobe docs state:
    The files are installed to Program Files\Adobe\<product name and version> unless a different location is selected in Personalization Options. By default, all of the other installer files are also cached to the same location. If you change the installation path, then the location of the setup files will change accordingly.
    We checked there and there's no cached items created.
    Obviously this causes issues when doing a repair.
    So it looks for like the AcroStan.msi file which doesn't exist anywhere on the pc.

    I'm not sure what you mean.
    You mean grab a copy of the CD or something and try a manual install?

  • Image Capture downloads pictures and creates .aae file

    Using Image Capture 6.6 to download pictures from my iPhone 5S to Macbook Air w/ OSX Yosemite.
    When I go to the folder where I download the files on my computer, it shows a .JPG file and an .AAE file.
    I cannot find preferences for Image Capture to turn the additional download off.
    It is doubling file size storage on my computer as each picture has a .JPG @ 600KB and an .AAE @ 600K
    I have bulk deleted the .AAE files using Spotlight and searching the file type, but do not wish to continue doing this if there is way to turn this off.

    stevencallan wrote:
    However, upgrading the camera to a newer Logitech device (Pro 9000, and the dropping of explicit support from Logitech with twain a while back), a "Select source" dialog window appears, with nothing in >the source list (so basically a blank text box with only the Cancel button active). Using a properties file works for other parameters (jdbc data source, logging, file name for the image), but kind of drawing a >blank on the data source for the camera.This is why I'm reluctant to upgrade software (imaginee frowney emoticon here; for those who still doubt wait until the next OTN site upgrade for another example). Stuff sometimes doesn't work any more when you do (imagine another frowny emoticon)
    Until a better idea comes along use a card-reader to put the files into a folder, then load them into Apex as a second step. This is not as conveneint as loading directly from the camera, but if the interface won't work you'll have to do somethiing else.
    I don't have immediate access to Apex - can you load off a card-reader instead of the camera by specifying the drive to load the files from?
    It sounds like more of a Windows problem than Apex. Have you tried browser searches on Logitech and Twain to see if anyone has encountered similar problems?

  • What file type and codec should I use for creating a file to send to have an HDCAM copy made

    I'm prepping to take a video file of my film into a tape dubbing house to have an HDCAM copy of my project made. I'm using a PC, so Apple ProRes is not an option. What file type, codec, and settings do you recommend?
    I was considering MXF, but the highest quality codec is XDCAM 50, which only does up to 50Mbps (I think). I believe HDCAM works at 140Mbps, so I would rather not give them a file that's compressed to almost 1/3rd that, especially since the source is a 5K 5120x2560 project. DPX maybe? I've never exported DPX before because it's not an option on my copy of CS6 - maybe that has to be downloaded separately? I was considering a Quicktim in H.264 at 140Mbps, but I think that would mean some serious rendering for the tape house. I would like to be able to offer them a few different options and see what they prefer, but this is an area where my knowledge runs thin. Any suggestions would be much appreciated. I'm hoping there's an industry standard that I can stick to.

    DPX maybe? I've never exported DPX before because it's not an option on my copy of CS6 - maybe that has to be downloaded separately?
    Your CS6 'Format' dropdown list should include DPX:
    Among the options you listed, DPX would be my choice.
    Be certain the dupe house can accept these files before proceeding.

  • Exporting document as jpeg using kAIExportDocumentAction creating html file also

    hi,
    I used this action (kAIExportDocumentAction) to export the document as jpeg.And it is  creating a html file aslo.
    And also it not prompt the "JPEG Option" dialogbox. When I set the kDialogOff to kDialogON it shows first the" Export Dialog" .
    is there any way to get only "Jpeg Option" dialog box while exporting through this action?
    plz Help!!!
    here are the code ....
    ai::FilePath filePath(ai::UnicodeString("C:\\Documents and Settings\\rudreshp\\Desktop\\Export\\rudresh\\hi.jpeg"));
    AIActionParamValueRef actionParam;
    //create a new action param value.
    sAIActionManager->AINewActionParamValue(&actionParam);
    //include the path where to save
    error = sAIActionManager->AIActionSetStringUS(actionParam, kAIExportDocumentNameKey, filePath.GetFullPath() );
    error = sAIActionManager->AIActionSetString(actionParam, kAIExportDocumentFormatKey, "JPEG file format");
    error = sAIActionManager->AIActionSetString(actionParam, kAIExportDocumentExtensionKey, "jpg");
    error = sAIActionManager->AIActionSetBoolean(actionParam, kAIExportDocumentSaveMultipleArtboardsKey, false);
    error = sAIActionManager->PlayActionEvent(kAIExportDocumentAction,  kDialogOff,  actionParam);
    //delete the actionParam
    error = sAIActionManager->AIDeleteActionParamValue(actionParam);

    The export document action is an action for exporting the doument as you have seen, it is not a Export Jpeg action.
    So, no it is not possible with the export action.

  • Can't create Cache file in Dreamweaver MX

    I just created a new website in Dreamweaver MX and for some
    reason I am getting the message
    Unable to write locate cache file

    In your stylesheet you have -
    .container {    overflow:hidden; width: 100%;}
    .container2 {   overflow:hidden; width: 646px; margin:0 0 10px 0}
    Try right clicking on the page in Design view and then selecting Element view > Full and see if that helps.

  • Using flex created swc file in CS4

    Hi,
    I have a bunch of AS3 code that is in a Flex 3 SWC project. I
    would like to use some of these libraries in a Flash CS4 project.
    is this possible? If so how?

    Hi Laurel:
    Whether or not you can read the license file, sure you will have problem then when trying to load your .so file.
    Java JNI call are not allowed inside OJVM for security reasons, see Kuassi's answer to a similar question:
    Access Berkeley DB from Java Stored Procedure
    Best regards, Marcelo.

  • How do I find out what codec was used in creating a file

    I am trying to edit a file that was saved unfortunately in Nero. When I try to open in anything Adobe it tells me that I have the wrong codec. I believe Nero saved in backing up the file as a MPEG4.
    Thanks
    Donna

    GSpot Codec Information Appliance

  • How to create a link to download a .psd or .eps file

    I'm attempting to create a link to a .psd file for a user to download. Whenever I link to the .psd file, Dreamweaver wants to convert it to a JPEG. Is there a way to link to a .psd file to have the user download that file? I'm trying to have files that retain the original Photoshop elements (layers, channels, etc.) used to create the file. I will want to do the same with .eps files, but haven't attempted that yet. Any thoughts?

    Zip it.   http://www.7-zip.org/ - for windows.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb

  • Need build.xml to create Ear file using Ant in jdeveloper 11g??

    Hi all,
    I think Jdeveloper use ANT to create Ear file and how to get build.xml from Jdeveloper.
    1) I have created ADF Fusion web Application having separte Model and View Controller.
    2) Now when I select View Controller project and then i create New ant-> Build.xml i get the required build.xml which can be used to create war file for my View Controller project.
    3) Similarly when I select Model project and then i create New ant-> Build.xml i get the required build.xml which can be used to create Jarfile for my Model project.
    4) If I select my application and then i click deploy... I'm able to create my ear file having both war file for View Controller and Jar File for Model.
    5) But I dont know how to get built.xml file which will create ear file having both View Controller and Model in it.
    Thanks a lot....

    However note the generated Ant script includes unnecessary targets. See the following blog post: http://one-size-doesnt-fit-all.blogspot.com/2010/11/using-ojdeploy-and-ant-for-creating-adf.html
    CM.

Maybe you are looking for

  • What Is Wrong With Java? STILL NOT ANSWERED, PLEASE ANSWER!

    So today (10 PM January 20th), the Firefox Plugin Checker said that my Java version was outdated. I also got a pop-up saying that my current version of Java at the time (Java 7 update 10) had vulnerabilities. So to try and fix this, I went to the Jav

  • Matching records in Import Manager

    Dear experts, I'm using SRM-MDM Catalog 3.0 and I need to create different catalogs using the same records, distinguished only by some fields like Catalog name, Category and supplier. But because Iu2019m using same product ID, when I try to import th

  • T61 Screen issues

    I'm hoping someone can help me with this issue. I have a T61 8891-CTO. Two days ago when I woke the computer from sleep mode, the screen never came on. I restarted thinking it was having a problem and the screen lights up for a minute but displays no

  • VA01 Shedule Lines - Confirmed Quantity

    Hi there? I have a requirement for Sales Orders created via IDocs, according the material batch change the confirmed quantity to cero, even when inventory is available. I have been searching for a user exit to include this logic, but still I have not

  • Obiee and informatica in one system

    Hi gurus a simple doubt can we install obiee 11g and informatica 9.0.1 in one system for learning since am confused by various posts if it is possible then wch os I have to use since my pc is 64bit os win 7 I heard informatica cannot be installed on