Click here to Skip to main content
15,910,981 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CreateDIBSection() is failing Pin
Richard MacCutchan25-Aug-13 1:37
mveRichard MacCutchan25-Aug-13 1:37 
GeneralRe: CreateDIBSection() is failing Pin
ash_hdr25-Aug-13 2:00
ash_hdr25-Aug-13 2:00 
GeneralRe: CreateDIBSection() is failing Pin
Richard MacCutchan25-Aug-13 2:41
mveRichard MacCutchan25-Aug-13 2:41 
GeneralRe: CreateDIBSection() is failing Pin
ash_hdr25-Aug-13 2:48
ash_hdr25-Aug-13 2:48 
GeneralRe: CreateDIBSection() is failing Pin
Richard MacCutchan25-Aug-13 2:51
mveRichard MacCutchan25-Aug-13 2:51 
GeneralRe: CreateDIBSection() is failing Pin
pasztorpisti25-Aug-13 2:13
pasztorpisti25-Aug-13 2:13 
GeneralRe: CreateDIBSection() is failing Pin
ash_hdr25-Aug-13 2:22
ash_hdr25-Aug-13 2:22 
GeneralRe: CreateDIBSection() is failing Pin
pasztorpisti25-Aug-13 5:46
pasztorpisti25-Aug-13 5:46 
You can calculate the memory needed by the dibsection and you should be able to track the memory allocation in your program. Put in some diagnostic code: When this createdibsection fails then run the diagnostic code that gets the available free memory and so on. Getting the free memory may not be the best diagnostic as sometimes the OS lies (for many reasons) and the available memory may be available only as fragmented small pieces. maybe a good diagnostic could could try to perform a malloc with approximately the size of the image (maybe a bit more, for example twice the size of the image). If this malloc fails then you probably went out of available memory. Use your creativity, these were just some stupid things I would try first...

3*6000*4000 == 72000000 bytes ~ 72megs. If you allocate 72 megs chunks rapidly you can exhaust even 1 gig of memory quite quickly...
GeneralRe: CreateDIBSection() is failing Pin
ash_hdr25-Aug-13 23:26
ash_hdr25-Aug-13 23:26 
GeneralRe: CreateDIBSection() is failing Pin
pasztorpisti25-Aug-13 23:43
pasztorpisti25-Aug-13 23:43 
GeneralRe: CreateDIBSection() is failing Pin
ash_hdr26-Aug-13 2:22
ash_hdr26-Aug-13 2:22 
GeneralRe: CreateDIBSection() is failing Pin
Richard MacCutchan26-Aug-13 4:08
mveRichard MacCutchan26-Aug-13 4:08 
GeneralRe: CreateDIBSection() is failing Pin
pasztorpisti26-Aug-13 4:31
pasztorpisti26-Aug-13 4:31 
GeneralRe: CreateDIBSection() is failing Pin
Richard MacCutchan26-Aug-13 4:41
mveRichard MacCutchan26-Aug-13 4:41 
GeneralRe: CreateDIBSection() is failing Pin
pasztorpisti26-Aug-13 4:46
pasztorpisti26-Aug-13 4:46 
SuggestionRe: CreateDIBSection() is failing Pin
pasztorpisti25-Aug-13 0:26
pasztorpisti25-Aug-13 0:26 
AnswerRe: CreateDIBSection() is failing Pin
Chris Losinger26-Aug-13 8:14
professionalChris Losinger26-Aug-13 8:14 
QuestionNew Document Window Placement [SOLVED] Pin
Richard Andrew x6424-Aug-13 13:51
professionalRichard Andrew x6424-Aug-13 13:51 
QuestionShell Icon Pin
Richard Andrew x6424-Aug-13 9:08
professionalRichard Andrew x6424-Aug-13 9:08 
AnswerRe: Shell Icon Pin
pasztorpisti24-Aug-13 9:27
pasztorpisti24-Aug-13 9:27 
GeneralRe: Shell Icon Pin
Richard Andrew x6424-Aug-13 12:40
professionalRichard Andrew x6424-Aug-13 12:40 
GeneralRe: Shell Icon Pin
pasztorpisti25-Aug-13 0:24
pasztorpisti25-Aug-13 0:24 
QuestionMore CProperyPage blues – CEdit control Pin
Vaclav_23-Aug-13 16:54
Vaclav_23-Aug-13 16:54 
QuestionRe: More CProperyPage blues – CEdit control Pin
David Crow24-Aug-13 4:36
David Crow24-Aug-13 4:36 
AnswerRe: More CProperyPage blues – CEdit control Pin
Vaclav_24-Aug-13 5:17
Vaclav_24-Aug-13 5:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.