Click here to Skip to main content
15,887,355 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDynamic char Array Pin
jlgeris2-Jul-09 5:38
jlgeris2-Jul-09 5:38 
AnswerRe: Dynamic char Array Pin
jlgeris2-Jul-09 5:42
jlgeris2-Jul-09 5:42 
AnswerRe: Dynamic char Array Pin
«_Superman_»2-Jul-09 5:54
professional«_Superman_»2-Jul-09 5:54 
GeneralRe: Dynamic char Array Pin
jlgeris2-Jul-09 7:14
jlgeris2-Jul-09 7:14 
GeneralRe: Dynamic char Array Pin
Stuart Dootson2-Jul-09 9:20
professionalStuart Dootson2-Jul-09 9:20 
GeneralRe: Dynamic char Array Pin
jlgeris2-Jul-09 9:32
jlgeris2-Jul-09 9:32 
AnswerRe: Dynamic char Array Pin
Stuart Dootson2-Jul-09 10:46
professionalStuart Dootson2-Jul-09 10:46 
QuestionCString::Format causing Advanced Direct Buffer Access error Pin
colm omahony2-Jul-09 5:18
colm omahony2-Jul-09 5:18 
Hello,
my program takes in a large file(s) of byte code and writes it into thousands of smaller files.
The program gives an MFC42D.DLL: 0xC00000005 Access Violation when it reaches the first of two lines of code below.

<pre> siteAndChannelIDStr.Format("C:\\Network Data\\Unclassified Events\\Last Extracted\\%s\\#%d\\", siteNamesArray[listBoxIndex], OCUIDfromEALFile);
CreateDirectory(siteAndChannelIDStr, NULL);


The CString object and directory are successfully created during the previous iterations, but oddly fails this time round.

I have followed the program execution using the debugger and it falls down at "if" statement in the "Advanced direct buffer access" bit in MFC\SRC\STRCORE.cpp


<code> if (GetData()->nRefs > 1 || nMinBufLength > GetData()->nAllocLength)


I have tried setting siteAndChannelIDStr = ""; after use
And changing the Format function to one described on the microsoft website &lt;a href="http://support.microsoft.com/kb/127038"></a>
And tried using CString Arrays for the siteNamesArray

But no luck!
Has anyone come across this type of problem before?

I have tried the program out on 3 different files, but it fails at the same line (although prog had passed this line for each previous hundreds of iterations)

It fails after subfile 4977/10893 in file1
after subfile 4901/8135 in file2
after subfile 384/13321 in file3

Any help would be greatly appreciated!
I can provide more information if necessary. I cannot put up source code as it is for my work.

Thanks,
Colm
AnswerRe: CString::Format causing Advanced Direct Buffer Access error Pin
Stuart Dootson2-Jul-09 6:33
professionalStuart Dootson2-Jul-09 6:33 
GeneralRe: CString::Format causing Advanced Direct Buffer Access error Pin
colm omahony3-Jul-09 3:29
colm omahony3-Jul-09 3:29 
GeneralRe: CString::Format causing Advanced Direct Buffer Access error Pin
Stuart Dootson3-Jul-09 3:37
professionalStuart Dootson3-Jul-09 3:37 
GeneralRe: CString::Format causing Advanced Direct Buffer Access error Pin
colm omahony12-Jul-09 23:15
colm omahony12-Jul-09 23:15 
GeneralRe: CString::Format causing Advanced Direct Buffer Access error Pin
colm omahony12-Jul-09 23:55
colm omahony12-Jul-09 23:55 
GeneralRe: CString::Format causing Advanced Direct Buffer Access error Pin
Stuart Dootson12-Jul-09 23:59
professionalStuart Dootson12-Jul-09 23:59 
Questiontransparent window with OpenGL Pin
kedanz2-Jul-09 5:08
kedanz2-Jul-09 5:08 
AnswerRe: transparent window with OpenGL Pin
led mike2-Jul-09 5:35
led mike2-Jul-09 5:35 
AnswerRe: transparent window with OpenGL Pin
Sarath C2-Jul-09 5:39
Sarath C2-Jul-09 5:39 
AnswerRe: transparent window with OpenGL Pin
Karl Phillip2-Jun-11 6:10
Karl Phillip2-Jun-11 6:10 
QuestionCSliderCtrl Pin
jung-kreidler2-Jul-09 4:14
jung-kreidler2-Jul-09 4:14 
QuestionRe: CSliderCtrl [modified] Pin
led mike2-Jul-09 4:19
led mike2-Jul-09 4:19 
AnswerRe: CSliderCtrl Pin
jung-kreidler2-Jul-09 19:36
jung-kreidler2-Jul-09 19:36 
GeneralRe: CSliderCtrl Pin
Chandrasekharan P2-Jul-09 19:56
Chandrasekharan P2-Jul-09 19:56 
GeneralRe: CSliderCtrl Pin
jung-kreidler2-Jul-09 20:00
jung-kreidler2-Jul-09 20:00 
AnswerRe: CSliderCtrl Pin
SandipG 2-Jul-09 21:26
SandipG 2-Jul-09 21:26 
GeneralRe: CSliderCtrl Pin
jung-kreidler2-Jul-09 22:52
jung-kreidler2-Jul-09 22:52 

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.