Click here to Skip to main content
15,889,629 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Scrollable CDialog Pin
Maximilien10-Sep-03 10:20
Maximilien10-Sep-03 10:20 
GeneralCFile::GetFilePath() setting error Pin
Jamie Hale10-Sep-03 7:03
Jamie Hale10-Sep-03 7:03 
GeneralRe: CFile::GetFilePath() setting error Pin
David Crow10-Sep-03 7:23
David Crow10-Sep-03 7:23 
GeneralRe: CFile::GetFilePath() setting error Pin
Jamie Hale10-Sep-03 7:32
Jamie Hale10-Sep-03 7:32 
GeneralRe: CFile::GetFilePath() setting error Pin
David Crow10-Sep-03 7:47
David Crow10-Sep-03 7:47 
GeneralRe: CFile::GetFilePath() setting error Pin
Jamie Hale10-Sep-03 7:53
Jamie Hale10-Sep-03 7:53 
GeneralRe: CFile::GetFilePath() setting error Pin
David Crow10-Sep-03 8:00
David Crow10-Sep-03 8:00 
GeneralRe: CFile::GetFilePath() setting error Pin
Jamie Hale10-Sep-03 8:32
Jamie Hale10-Sep-03 8:32 
DavidCrow wrote:
Strange, as I see no calls to SetLastError() in filest.cpp.

Well, GetFilePath() makes several API calls. These typically return a value indicating an error has occurred and set the last error value.

DavidCrow wrote:
And for GetFilePath() to return data whilst also setting the error value is odd.

Hence my confusion.

DavidCrow wrote:
Usually when a functions sets an error, no useable data is returned.

There are no documented error conditions in CFile::GetFilePath(). According to MSDN it shouldn't even throw any exceptions, although the example wraps the call in a try/catch block.

My code throws no exception. We only found the problem because a GetLastError() call later in the process was giving the error code when the API call legitimately didn't fail.

J

"I am the Lorax. I speak for the trees."

GeneralRe: CFile::GetFilePath() setting error Pin
David Crow10-Sep-03 10:05
David Crow10-Sep-03 10:05 
GeneralRe: CFile::GetFilePath() setting error Pin
Jamie Hale10-Sep-03 10:26
Jamie Hale10-Sep-03 10:26 
GeneralRe: CFile::GetFilePath() setting error Pin
David Crow10-Sep-03 10:38
David Crow10-Sep-03 10:38 
GeneralRe: CFile::GetFilePath() setting error Pin
Jamie Hale10-Sep-03 10:46
Jamie Hale10-Sep-03 10:46 
GeneralRe: CFile::GetFilePath() setting error Pin
David Crow11-Sep-03 2:27
David Crow11-Sep-03 2:27 
GeneralRe: CFile::GetFilePath() setting error Pin
Alvaro Mendez10-Sep-03 8:13
Alvaro Mendez10-Sep-03 8:13 
GeneralRe: CFile::GetFilePath() setting error Pin
Jamie Hale10-Sep-03 8:33
Jamie Hale10-Sep-03 8:33 
GeneralCOM port Access Pin
wogerdoger10-Sep-03 6:54
wogerdoger10-Sep-03 6:54 
GeneralRe: COM port Access Pin
Anonymous10-Sep-03 8:01
Anonymous10-Sep-03 8:01 
GeneralRe: COM port Access Pin
wogerdoger10-Sep-03 12:31
wogerdoger10-Sep-03 12:31 
GeneralRe: COM port Access Pin
DarkMarine11-Sep-03 8:18
DarkMarine11-Sep-03 8:18 
QuestionHow to catch an exception in dll? Pin
Eugene Pustovoyt10-Sep-03 6:43
Eugene Pustovoyt10-Sep-03 6:43 
AnswerRe: How to catch an exception in dll? Pin
David Crow10-Sep-03 6:52
David Crow10-Sep-03 6:52 
GeneralRe: How to catch an exception in dll? Pin
Eugene Pustovoyt10-Sep-03 7:57
Eugene Pustovoyt10-Sep-03 7:57 
GeneralRe: How to catch an exception in dll? Pin
David Crow10-Sep-03 8:02
David Crow10-Sep-03 8:02 
GeneralRe: How to catch an exception in dll? Pin
Alvaro Mendez10-Sep-03 8:23
Alvaro Mendez10-Sep-03 8:23 
AnswerRe: How to catch an exception in dll? Pin
Joel Lucsy10-Sep-03 11:19
Joel Lucsy10-Sep-03 11:19 

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.