Click here to Skip to main content
15,880,891 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionBuffer overrun, Strsafe.h compiler options..... Pin
ForNow7-Feb-09 23:41
ForNow7-Feb-09 23:41 
AnswerRe: Buffer overrun, Strsafe.h compiler options..... Pin
Cedric Moonen7-Feb-09 23:54
Cedric Moonen7-Feb-09 23:54 
GeneralRe: Buffer overrun, Strsafe.h compiler options..... Pin
ForNow8-Feb-09 1:22
ForNow8-Feb-09 1:22 
AnswerRe: Buffer overrun, Strsafe.h compiler options..... Pin
Jonathan Davies7-Feb-09 23:55
Jonathan Davies7-Feb-09 23:55 
GeneralRe: Buffer overrun, Strsafe.h compiler options..... Pin
ForNow8-Feb-09 1:20
ForNow8-Feb-09 1:20 
AnswerRe: Buffer overrun, Strsafe.h compiler options..... Pin
Stephen Hewitt8-Feb-09 4:44
Stephen Hewitt8-Feb-09 4:44 
GeneralRe: Buffer overrun, Strsafe.h compiler options..... Pin
ForNow8-Feb-09 7:16
ForNow8-Feb-09 7:16 
AnswerRe: Buffer overrun, Strsafe.h compiler options..... Pin
cmk8-Feb-09 11:56
cmk8-Feb-09 11:56 
For 20+yrs C/C++ programmers have been writting programs, without buffer overruns, using strcpy, i find it odd that you _need_ StringCchCopy.

strcpy is also available as an intrinsic which, if you are doing a lot of string copying, can result in a significant performance improvement over StringCchCopy.

The 'safe' versions have been added by MS because of the amount of lazy/poor programming that exists, not because they are needed.

The only legit reason, i see, for using the MS String* functions is an effort to remove all direct references to the CRT, thus removing its direct linking (however, as an intrinsic, strcpy alone does not induce a CRT dependency).

Make sure you include windows.h (winnt.h) before strsafe.h.

...cmk

The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.
- John Carmack

QuestionIs there anyway to make SEH works when stask is broken Pin
Tal Rasha's Guardianship7-Feb-09 16:49
Tal Rasha's Guardianship7-Feb-09 16:49 
AnswerRe: Is there anyway to make SEH works when stask is broken Pin
Stuart Dootson7-Feb-09 22:52
professionalStuart Dootson7-Feb-09 22:52 
GeneralRe: Is there anyway to make SEH works when stask is broken Pin
Tal Rasha's Guardianship22-Feb-09 17:15
Tal Rasha's Guardianship22-Feb-09 17:15 
AnswerRe: Is there anyway to make SEH works when stask is broken Pin
Stephen Hewitt8-Feb-09 4:45
Stephen Hewitt8-Feb-09 4:45 
GeneralRe: Is there anyway to make SEH works when stask is broken Pin
Tal Rasha's Guardianship22-Feb-09 16:50
Tal Rasha's Guardianship22-Feb-09 16:50 
AnswerRe: Is there anyway to make SEH works when stask is broken Pin
Rolf Kristensen8-Feb-09 10:23
Rolf Kristensen8-Feb-09 10:23 
GeneralRe: Is there anyway to make SEH works when stask is broken Pin
Tal Rasha's Guardianship22-Feb-09 16:28
Tal Rasha's Guardianship22-Feb-09 16:28 
QuestionHelp Repainting with GDI+ in C++ Pin
AntiBNI7-Feb-09 12:05
AntiBNI7-Feb-09 12:05 
AnswerRe: Help Repainting with GDI+ in C++ Pin
Stuart Dootson7-Feb-09 22:57
professionalStuart Dootson7-Feb-09 22:57 
GeneralRe: Help Repainting with GDI+ in C++ Pin
AntiBNI8-Feb-09 2:24
AntiBNI8-Feb-09 2:24 
QuestionMFC Combo Box Pin
VarwigDude7-Feb-09 8:22
VarwigDude7-Feb-09 8:22 
AnswerRe: MFC Combo Box Pin
Stuart Dootson7-Feb-09 23:00
professionalStuart Dootson7-Feb-09 23:00 
QuestionHow to convert jpg image to rgb Pin
simon alec smith7-Feb-09 5:49
simon alec smith7-Feb-09 5:49 
GeneralWord Capture Pin
Swapnil Shah7-Feb-09 0:18
Swapnil Shah7-Feb-09 0:18 
AnswerRe: Word Capture Pin
Rajesh R Subramanian7-Feb-09 5:30
professionalRajesh R Subramanian7-Feb-09 5:30 
QuestionRe: Word Capture Pin
Swapnil Shah7-Feb-09 8:10
Swapnil Shah7-Feb-09 8:10 
AnswerRe: Word Capture Pin
Rajesh R Subramanian7-Feb-09 19:25
professionalRajesh R Subramanian7-Feb-09 19:25 

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.