Click here to Skip to main content
15,921,212 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow can I know where a program leaks memory if it hangs after 48 hours of working? Pin
Joan M22-Nov-04 6:45
professionalJoan M22-Nov-04 6:45 
AnswerRe: How can I know where a program leaks memory if it hangs after 48 hours of working? Pin
BlackDice22-Nov-04 8:46
BlackDice22-Nov-04 8:46 
AnswerRe: How can I know where a program leaks memory if it hangs after 48 hours of working? Pin
floresa922-Nov-04 11:54
floresa922-Nov-04 11:54 
Generalslider Pin
teneff22-Nov-04 4:42
teneff22-Nov-04 4:42 
GeneralRe: slider Pin
David Crow22-Nov-04 4:51
David Crow22-Nov-04 4:51 
GeneralRe: slider Pin
teneff22-Nov-04 5:18
teneff22-Nov-04 5:18 
GeneralRe: slider Pin
David Crow22-Nov-04 6:12
David Crow22-Nov-04 6:12 
GeneralWinprog OPENFILENAME Pin
henry12822-Nov-04 3:22
henry12822-Nov-04 3:22 
Need help please. Sorry for long and tedious introduction.
In Win32 API the OpenFileDialog runs by initializing the OPENFILENAME struct. (quote msdn) a buffer provided in the ofn.lpstrFile member holds all the file info including path. The ofn.lpstrFileTitle holds the name of the file and ofn.MaxFile member points to the offset in the string contained in lpstrFile where the filename is located.
If ofn.dwFlags is provided with the OFN_ALLOWMULTISELECT flag ,one is able to select multiple files at a time ,which all are contained-separated by '\0'- in the lpstrFile buffer. So this would look someting like
"C:\programs\myapp\0file1.txt\0file2.txt\0"
msdn states that if the multiselect-flag is NOT set,than the system takes the path info from the lpstrFile buffer. However,this seems not to be the case when the multiselect flag is set. It seems that in multi-mode directory information is no longer preserved. Sadly msdn doesn't touch this subject, does anyone know if ,and how the path info in case of multiselect is stored?
For processing more selected files, I read them out of the buffer one at a time and strcat them to the path,yielding a usable file-identifier. Problem however is that if I select files from directories that are further from the root,and with many characters in their name, these files seem to be invalid as the system doesn't process them any more.
As this smells of a buffer undersize,I tried enlarging sizes of various buffers and intermediate var's but however, with no success up to now. Maybe someone has a tip?
I.m currently ona Win2k system

thanx in advance
GeneralRe: Winprog OPENFILENAME Pin
David Crow22-Nov-04 5:12
David Crow22-Nov-04 5:12 
QuestionHow to get Security Options found in MMC Pin
Yuvaraj N22-Nov-04 2:30
Yuvaraj N22-Nov-04 2:30 
Generalsmtp in mail Pin
Member 150757022-Nov-04 1:30
Member 150757022-Nov-04 1:30 
GeneralRe: smtp in mail Pin
David Crow22-Nov-04 3:16
David Crow22-Nov-04 3:16 
GeneralRe: smtp in mail Pin
BaldwinMartin23-Nov-04 10:11
BaldwinMartin23-Nov-04 10:11 
GeneralSaving a file Pin
efendy22-Nov-04 1:30
efendy22-Nov-04 1:30 
GeneralRe: Saving a file Pin
David Crow22-Nov-04 8:52
David Crow22-Nov-04 8:52 
QuestionHow to do this? Pin
pubududilena22-Nov-04 0:37
pubududilena22-Nov-04 0:37 
AnswerRe: How to do this? Pin
Steve S22-Nov-04 1:27
Steve S22-Nov-04 1:27 
GeneralGetting User Details Pin
Yuvaraj N22-Nov-04 0:23
Yuvaraj N22-Nov-04 0:23 
GeneralRe: Getting User Details Pin
ThatsAlok22-Nov-04 17:24
ThatsAlok22-Nov-04 17:24 
GeneralLinker Error In SAL module on linking open office code Pin
nitinmahajan8022-Nov-04 0:22
nitinmahajan8022-Nov-04 0:22 
GeneralTTN_NEEDTEXT Not Calling Pin
Rajesh_Parameswaran22-Nov-04 0:16
Rajesh_Parameswaran22-Nov-04 0:16 
GeneralRe: TTN_NEEDTEXT Not Calling Pin
David Crow22-Nov-04 8:38
David Crow22-Nov-04 8:38 
GeneralRe: TTN_NEEDTEXT Not Calling Pin
Rajesh_Parameswaran22-Nov-04 18:57
Rajesh_Parameswaran22-Nov-04 18:57 
QuestionHow to send a message to a dialog Pin
Nest22-Nov-04 0:15
Nest22-Nov-04 0:15 
AnswerRe: How to send a message to a dialog Pin
Rajesh_Parameswaran22-Nov-04 0:47
Rajesh_Parameswaran22-Nov-04 0:47 

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.