Click here to Skip to main content
15,915,324 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: header file Pin
Stuart Dootson16-Jan-10 11:10
professionalStuart Dootson16-Jan-10 11:10 
GeneralRe: header file Pin
khomeyni18-Jan-10 8:50
khomeyni18-Jan-10 8:50 
QuestionHow can generate service from exe? Pin
Le@rner15-Jan-10 19:58
Le@rner15-Jan-10 19:58 
AnswerRe: How can generate service from exe? Pin
Garth J Lancaster15-Jan-10 22:36
professionalGarth J Lancaster15-Jan-10 22:36 
GeneralRe: How can generate service from exe? Pin
Le@rner16-Jan-10 0:43
Le@rner16-Jan-10 0:43 
GeneralRe: How can generate service from exe? Pin
JudyL_MD16-Jan-10 2:55
JudyL_MD16-Jan-10 2:55 
AnswerRe: How can generate service from exe? Pin
loyal ginger16-Jan-10 2:28
loyal ginger16-Jan-10 2:28 
QuestionCButton GetState , how to read the press and hold state of a button? Pin
timbk15-Jan-10 11:45
timbk15-Jan-10 11:45 
AnswerRe: CButton GetState , how to read the press and hold state of a button? Pin
Hamid_RT15-Jan-10 20:26
Hamid_RT15-Jan-10 20:26 
GeneralRe: CButton GetState , how to read the press and hold state of a button? Pin
timbk16-Jan-10 11:18
timbk16-Jan-10 11:18 
AnswerRe: CButton GetState , how to read the press and hold state of a button? Pin
Rozis16-Jan-10 10:17
Rozis16-Jan-10 10:17 
Questionsystem call too small Pin
2buck5615-Jan-10 10:36
2buck5615-Jan-10 10:36 
AnswerRe: system call too small Pin
CPallini15-Jan-10 10:44
mveCPallini15-Jan-10 10:44 
GeneralRe: system call too small Pin
2buck5615-Jan-10 11:36
2buck5615-Jan-10 11:36 
GeneralRe: system call too small Pin
LunaticFringe15-Jan-10 11:44
LunaticFringe15-Jan-10 11:44 
GeneralRe: system call too small Pin
2buck5615-Jan-10 12:26
2buck5615-Jan-10 12:26 
GeneralRe: system call too small Pin
Garth J Lancaster15-Jan-10 12:49
professionalGarth J Lancaster15-Jan-10 12:49 
GeneralRe: system call too small Pin
LunaticFringe15-Jan-10 13:01
LunaticFringe15-Jan-10 13:01 
GeneralRe: system call too small Pin
2buck5615-Jan-10 13:51
2buck5615-Jan-10 13:51 
GeneralRe: system call too small [modified] Pin
LunaticFringe15-Jan-10 14:31
LunaticFringe15-Jan-10 14:31 
GeneralRe: system call too small Pin
2buck5615-Jan-10 15:02
2buck5615-Jan-10 15:02 
GeneralRe: system call too small Pin
CPallini15-Jan-10 22:02
mveCPallini15-Jan-10 22:02 
GeneralRe: system call too small Pin
CPallini15-Jan-10 22:11
mveCPallini15-Jan-10 22:11 
As  L u n a t i c F r i n g e   already noted, that's not the point: since CreateFile does NOT fail, hence GetLastError is reporting an error coming from a previous API call (which one?!).
Your approach to error handling is wrong: you've to:
  1. First and always check API return value.
  2. Then (if the API call failed) call GetLastError to retrieve additional information.

Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

GeneralRe: system call too small Pin
Garth J Lancaster15-Jan-10 22:41
professionalGarth J Lancaster15-Jan-10 22:41 
GeneralRe: system call too small Pin
CPallini15-Jan-10 22:43
mveCPallini15-Jan-10 22:43 

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.