Article View: borland.public.cppbuilder.nativeapi
Article #13685Re: Send a mail with attachment
From: Remy Lebeau (TeamB)
Date: Sun, 28 Sep 2003 20:47
Date: Sun, 28 Sep 2003 20:47
27 lines
1894 bytes
1894 bytes
"Rodolfo Frino" <rodolfofrino@yahoo.com> wrote in message
news:3f77017d@newsgroups.borland.com...
> for (unsigned int i=0; i < strlen(s) ; i++)
I would suggest caching the strlen() return value to a separate variable,
then you don't have to call strlen() on every iteration of the loop, which
is wasteful:
int length = strlen(s)
for (unsigned int i=0; i < length ; i++)
> if (isupper(*(s+i)) || strchr(CSpecialChar, *(s+i)))
You could use the '[]' notation instead of using pointer arithmetic and
pointer derferencing:
if (isupper(s[i]) || strchr(CSpecialChar, s[i]))
The same goes for using the characters in the calls to keybd_event() as
well. Technically, the notiations are the same thing as far as the compiler
is concerned, but using '[]' is more common and a little easier to read.
Gambit
Technical Details
Message-ID:
<3f7748a6@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f70794d@newsgroups.borland.com> <3f7545de@newsgroups.borland.com> <3f755135@newsgroups.borland.com> <3f77017d@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,23d9e1242f297072 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-09-28 14:09:08 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f70794d@newsgroups.borland.com> <3f7545de@newsgroups.borland.com> <3f755135@newsgroups.borland.com> <3f77017d@newsgroups.borland.com> Subject: Re: Send a mail with attachment Date: Sun, 28 Sep 2003 13:47:34 -0700 Lines: 29 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 67.23.78.204 Message-ID: <3f7748a6@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1064781990 67.23.78.204 (28 Sep 2003 13:46:30 -0700) Path: arc1-ca.pugleaf.net!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail