Click here to Skip to main content
       

ATL / WTL / STL

 
GeneralRe: get instance of object (in exe) from dll caller Pinmemberpasztorpisti17-Sep-12 13:48 
AnswerRe: get instance of object (in exe) from dll caller PinmvpRichard MacCutchan17-Sep-12 22:16 
AnswerRe: get instance of object (in exe) from dll caller PinmemberStephen Hewitt18-Sep-12 18:49 
QuestionCAsyncSocket Connect says in use Pinmemberbkelly1316-Sep-12 6:07 
Answerunexpected behavior [modified] Pinmemberbkelly1316-Sep-12 10:07 
AnswerRe: CAsyncSocket Connect says in use PinmemberRichard Andrew x6416-Sep-12 11:53 
AnswerRe: CAsyncSocket Connect says in use Pinmemberpasztorpisti16-Sep-12 12:05 
GeneralRe: CAsyncSocket Connect says in use Pinmemberbkelly1316-Sep-12 12:55 
GeneralRe: CAsyncSocket Connect says in use Pinmemberpasztorpisti16-Sep-12 13:09 
GeneralRe: CAsyncSocket Connect says in use Pinmemberbkelly1316-Sep-12 13:17 
GeneralRe: CAsyncSocket Connect says in use Pinmemberpasztorpisti16-Sep-12 13:34 
GeneralRe: CAsyncSocket Connect says in use [modified] Pinmemberbkelly1316-Sep-12 14:07 
Questionbetter version of strcpy() and printf() Pinmemberbkelly1315-Sep-12 10:02 
AnswerRe: better version of strcpy() and printf() PinmentorPaul Watt15-Sep-12 12:33 
bkelly13 wrote:
Are there any versions of ...cpy...() and ...printf...() that limit the count of
characters copied to the space found in the destination string.  
Without an ungracefull app crash?

 
Unfortunately, No. Strcpy and printf are two of the most common functions that hackers use to exploit programming errors to "hack" into a program. When using these functions you need to pay extra attention to the size of your memory buffers and the actions you are performing on them.
 
You may have better luck with the C++ Standard Library.
 
The std::string class will manage your memory buffers, copies and concatenations.
std::cout doesn't have the program crash issues that you are running into.
All of my software is powered by a single Watt.

GeneralRe: better version of strcpy() and printf() Pinmemberbkelly1315-Sep-12 15:34 
GeneralRe: better version of strcpy() and printf() PinmentorPaul Watt15-Sep-12 15:45 
GeneralRe: better version of strcpy() and printf() Pinmemberbkelly1315-Sep-12 16:23 
GeneralRe: better version of strcpy() and printf() Pinmemberpasztorpisti16-Sep-12 6:54 
GeneralRe: better version of strcpy() and printf() PinmvpRichard MacCutchan16-Sep-12 0:10 
AnswerRe: better version of strcpy() and printf() PinmemberRichard Andrew x6415-Sep-12 17:01 
AnswerRe: better version of strcpy() and printf() PinmvpRichard MacCutchan16-Sep-12 0:09 
AnswerRe: better version of strcpy() and printf() Pinmemberpasztorpisti16-Sep-12 1:37 
AnswerRe: better version of strcpy() and printf() PinmemberStephen Hewitt18-Sep-12 0:29 
Questionget a number into static text control Pinmemberbkelly1313-Sep-12 17:05 
AnswerRe: get a number into static text control PinmvpRichard MacCutchan13-Sep-12 21:52 
GeneralRe: get a number into static text control Pinmemberbkelly1314-Sep-12 15:00 
GeneralRe: get a number into static text control PinmentorPaul Watt14-Sep-12 15:36 
GeneralRe: get a number into static text control PinmvpRichard MacCutchan14-Sep-12 23:02 
GeneralRe: get a number into static text control Pinmemberbkelly1315-Sep-12 5:14 
GeneralRe: get a number into static text control PinmvpRichard MacCutchan15-Sep-12 5:42 
QuestionMirroring system imagelist Pinmemberhuzifa3011-Sep-12 15:27 
QuestionCAsyncSocket, first application [modified] Pinmemberbkelly139-Sep-12 5:26 
AnswerRe: CAsyncSocket, first application PinmentorPaul Watt14-Sep-12 15:47 
QuestionAfxGetThread vs GetCurrentThreadID Pinmemberkishorekumarnaik6-Sep-12 6:52 
AnswerRe: AfxGetThread vs GetCurrentThreadID PinmemberJiří Miklík7-Sep-12 0:24 
Questionerror C2039: 'abort' : is not a member of 'std' PinmemberKASR12-Sep-12 23:35 
AnswerRe: error C2039: 'abort' : is not a member of 'std' PinmvpRichard MacCutchan3-Sep-12 0:50 
GeneralRe: error C2039: 'abort' : is not a member of 'std' PinmemberKASR13-Sep-12 1:44 
GeneralRe: error C2039: 'abort' : is not a member of 'std' PinmvpRichard MacCutchan3-Sep-12 2:21 
AnswerRe: error C2039: 'abort' : is not a member of 'std' PinmemberStephen Hewitt3-Sep-12 16:54 
GeneralRe: error C2039: 'abort' : is not a member of 'std' PinmemberKASR13-Sep-12 19:46 
GeneralRe: error C2039: 'abort' : is not a member of 'std' PinmvpRichard MacCutchan3-Sep-12 22:18 
GeneralRe: error C2039: 'abort' : is not a member of 'std' PinmemberKASR13-Sep-12 22:29 
GeneralRe: error C2039: 'abort' : is not a member of 'std' PinmvpRichard MacCutchan3-Sep-12 23:23 
GeneralRe: error C2039: 'abort' : is not a member of 'std' PinmemberKASR14-Sep-12 2:36 
GeneralHow to print file inclusion stack in VC6 PinmemberKASR16-Aug-12 23:43 
Questionc++ and directshow Pinmembermexmerou4-Aug-12 0:04 
AnswerRe: c++ and directshow PinmvpRichard MacCutchan4-Aug-12 1:29 
AnswerRe: c++ and directshow Pinmemberbarneyman7-Aug-12 19:52 
AnswerRe: c++ and directshow Pinmemberjk chan15-Aug-12 20:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 12 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid