I am trying to hook the APIs InternetReadFile and InternetWriteFile. InternetReadFile reads data from a handle provided to it (acc. to documentation). Where this data is stored? In memory/RAM?
InternetWriteFile writes data to an open Internet file (acc. to documentation). Does that mean it stores data in disk? In temporary-internet-files folder maybe?
When I call InternetQueryOption function (with option=INTERNET_OPTION_DATAFILE_NAME) in Hook_InternetReadFile it returns a file name in temporary-internet-files folder. Whereas the function fails when called from Hook_InternetWriteFile with error code 12028 (=ERROR_INTERNET_ITEM_NOT_FOUND). Does this mean InternetReadFile writes data to disk?
I am confused. Please help.