Error occurred during http request {"data":"","status":0,"config":{"method":"GET","transformRequest":[null],"transformResponse":[null],"url":"https://dgps.support.microsoft.com/api/v1/AutoSuggestion?SearchTerm=&OSName=Windows 8&Culture=en-us","headers":{"Accept":"application/json, text/plain, */*"},"startTime":1446586239925},"statusText":""} https://preview.support.microsoft.com/bundles/jslibraries?v=7zWNoRr1mHRbVzieg2FG-DPR0MvOgfYmV0WRO-0N0CM1:1JSLL: Failure sending data to vortex: error https://preview.support.microsoft.com/bundles/application?v=430VEiAdr2R9QZ6VIhVUVChZ0G-dokW6yMWjvkTW1Ew1:1 in tJSLL: Failure sending data to vortex: error https://preview.support.microsoft.com/bundles/application?v=430VEiAdr2R9QZ6VIhVUVChZ0G-dokW6yMWjvkTW1Ew1:1 in tJSLL: Failure sending data to vortex: error https://preview.support.microsoft.com/bundles/application?v=430VEiAdr2R9QZ6VIhVUVChZ0G-dokW6yMWjvkTW1Ew1:1 in tJSLL: Failure sending data to vortex: error https://preview.support.microsoft.com/bundles/application?v=430VEiAdr2R9QZ6VIhVUVChZ0G-dokW6yMWjvkTW1Ew1:1 in tJSLL: Failure sending data to vortex: error https://preview.support.microsoft.com/bundles/application?v=430VEiAdr2R9QZ6VIhVUVChZ0G-dokW6yMWjvkTW1Ew1:1 in tJSLL: Failure sending data to vortex: error https://preview.support.microsoft.com/bundles/application?v=430VEiAdr2R9QZ6VIhVUVChZ0G-dokW6yMWjvkTW1Ew1:1 in t Microsoft Support

INFO: CreateFileMapping() SEC_* Flags

This article was previously published under Q108231
This article has been archived. It is offered "as is" and will no longer be updated.
SUMMARY
The definition of CreateFileMapping() is as follows:

   HANDLE CreateFileMapping(hFile, lpsa, fdwProtect, dwMaximumSizeHigh,				
dwMaximumSizeLow, lpszMapName)


   HANDLE hFile;   LPSECURITY_ATTRIBUTES lpsa;   DWORD fdwProtect;   DWORD dwMaximumSizeHigh;   DWORD dwMaximumSizeLow;   LPCTSTR lpszMapName;				


The following flags are four possible values for the parameter fdwProtect:

   SEC_COMMIT				
All pages of a section are to be set to the commit state.
   SEC_IMAGE				
The file specified for a section's file mapping is an executable image file.
   SEC_NOCACHE				
All pages of a section are to be set as noncacheable.
   SEC_RESERVE				
All pages of a section are to be set to the reserved state.


If none of these flags are specified, SEC_COMMIT is the default. Thisbehaves the same way as MEM_COMMIT in VirtualAlloc().
MORE INFORMATION

Windows NT



The SEC_RESERVE flag is intended for file mappings that are backed by thepaging file, and therefore use SEC_RESERVE only when hFile is -1. The pagesare reserved just as they are when the MEM_RESERVE flag is used inVirtualAlloc(). The pages can be committed by subsequently using theVirtualAlloc() application programming interface (API), specifyingMEM_COMMIT. Once committed, these pages cannot be decommitted.

The SEC_NOCACHE flag is intended for architectures that require variouslocking structures to be located in memory that is not ever fetched intothe CPU cache. On x86 and MIPS machines, use of this flag just slows downthe performance because the hardware keeps the cache coherent. Certaindevice drivers may require noncached data so that programs can writethrough to the physical memory. SEC_NOCACHE requires that eitherSEC_RESERVE or SEC_COMMIT be used in addition to SEC_NOCACHE.

The SEC_IMAGE flag indicates that the file handle points to an executablefile, and it should be loaded as such. The mapping information and fileprotection are taken from the image file, and therefore no other optionsare allowed when SEC_IMAGE is used.

Windows 95



Under Windows NT, the Win32 loader simply sits on top of the memory mappedfile subsystem, and so when the loader needs to load a PE executable, itsimply calls down into the existing memory mapped file code. Therefore, itis extremely easy for to support SEC_IMAGE in CreateFileMapping() underWindows NT.

In Windows 95, the loader is more complex and the memory mapped files aresimple and only support the bare minimum of functionality to make theexisting MapViewOfFile() work. Therefore, Windows 95 does not supportSEC_IMAGE. There is support for SEC_NOCACHE, SEC_RESERVE and SEC_COMMIT.
3.10 3.50 4.00
Properties

Article ID: 108231 - Last Review: 02/24/2014 08:18:09 - Revision: 3.2

  • Microsoft Win32 Application Programming Interface
  • kbnosurvey kbarchive kbinfo KB108231
Feedback