Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
H

HockeyNut

@HockeyNut
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Creating large DIB's using CreateDIBSection and CreateFileMapping
    H HockeyNut

    I have a situation where users are trying to create large 24bit DIBs (10,000 x 10,000) or greater and CreateDIBSection is failing. The problem appears to occur when virtual memory gets low. I can create the large DIBs when I don't have a lot of memory allocated for other things. I tried using the following: HANDLE hFileMap = CreateFileMapping( INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, dwStorageSize,NULL); dwLE = GetLastError(); if(INVALID_HANDLE_VALUE == hFile) hFile = NULL; if( NULL == hFileMap) ErrMsg( dwLE); LPVOID pDibBits = NULL; HBITMAP hBitmap = ::CreateDIBSection( NULL, m_bitmapinfo, DIB_RGB_COLORS, pDibBits, hFileMap, 0); dwLE = GetLastError(); The thought was that using CreateFileMapping() to allowcate memory for the DIB bits when memory was low but it still fails and GetLastError() return 0 which does not help. Is there a way to use swap file or temporary disk files as storage space for DIB bits when processing large bitmap files?

    C / C++ / MFC help graphics performance question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups