BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

W8066 Unreachable code

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language C++)
View previous topic :: View next topic  
Author Message
standus
Guest





PostPosted: Sun Mar 20, 2005 11:33 am    Post subject: W8066 Unreachable code Reply with quote




Hi,

I have a problem with using some API functions for Outlook Express.

here is short example:
Unit1.cpp is at: www.uncledelacruz.net/down/Unit1.cpp
Unit1.h is at: www.uncledelacruz.net/down/Unit1.h
and msoeapi.h is at: www.uncledelacruz.net/down/msoeapi.h

Problem is that I got warning: W8066 Unreachable code
on this line:
props.cbSize = sizeof(FOLDERPROPS);

Whats the problem please?
Please help.

standus
Back to top
Helmut Giese
Guest





PostPosted: Sun Mar 20, 2005 12:10 pm    Post subject: Re: W8066 Unreachable code Reply with quote



On 20 Mar 2005 03:33:40 -0800, "standus" <standus (AT) post (DOT) cz> wrote:

Quote:

Hi,

I have a problem with using some API functions for Outlook Express.

here is short example:
Unit1.cpp is at: www.uncledelacruz.net/down/Unit1.cpp
Unit1.h is at: www.uncledelacruz.net/down/Unit1.h
and msoeapi.h is at: www.uncledelacruz.net/down/msoeapi.h

Problem is that I got warning: W8066 Unreachable code
on this line:
props.cbSize = sizeof(FOLDERPROPS);

Whats the problem please?
Hi Standus,

the 'if' just preceding the offending line misses a closing brace (}).
Thus, this line is considered to be part of the 'if' AND it follows a
'return', so it can never be reached.
Normally, this code shouldn't even compile because of the missing '}',
but you have a second error: The next to last line of this function
contains a superfluous '}', so that for the compiler all braces match.
Nice way to shoot yourself in the foot Smile
HTH
Helmut Giese

Back to top
Standus
Guest





PostPosted: Sun Mar 20, 2005 7:48 pm    Post subject: Re: W8066 Unreachable code Reply with quote



Yes It was the problem.

But in finaly it dos not work.
So I rebuild it from begining and now its looking good except this error:
[C++ Error] Unit1.cpp(70): E2451 Undefined symbol 'm_pStoreNamespace'

All rebuilded files are in the same web location.
I am using this source:
http://www.codeproject.com/com/Outlook_Express_Messages.asp


Thank for your help.
Standus




"Helmut Giese" <hgiese (AT) ratiosoft (DOT) com> píše v diskusním příspěvku
news:423d6718.10589765 (AT) forums (DOT) borland.com...
Quote:
On 20 Mar 2005 03:33:40 -0800, "standus" <standus (AT) post (DOT) cz> wrote:


Hi,

I have a problem with using some API functions for Outlook Express.

here is short example:
Unit1.cpp is at: www.uncledelacruz.net/down/Unit1.cpp
Unit1.h is at: www.uncledelacruz.net/down/Unit1.h
and msoeapi.h is at: www.uncledelacruz.net/down/msoeapi.h

Problem is that I got warning: W8066 Unreachable code
on this line:
props.cbSize = sizeof(FOLDERPROPS);

Whats the problem please?
Hi Standus,
the 'if' just preceding the offending line misses a closing brace (}).
Thus, this line is considered to be part of the 'if' AND it follows a
'return', so it can never be reached.
Normally, this code shouldn't even compile because of the missing '}',
but you have a second error: The next to last line of this function
contains a superfluous '}', so that for the compiler all braces match.
Nice way to shoot yourself in the foot Smile
HTH
Helmut Giese



Back to top
Helmut Giese
Guest





PostPosted: Sun Mar 20, 2005 8:28 pm    Post subject: Re: W8066 Unreachable code Reply with quote

On Sun, 20 Mar 2005 20:48:22 +0100, "Standus" <standus (AT) post (DOT) cz> wrote:

Quote:
Yes It was the problem.

But in finaly it dos not work.
So I rebuild it from begining and now its looking good except this error:
[C++ Error] Unit1.cpp(70): E2451 Undefined symbol 'm_pStoreNamespace'
Well, this can only mean that it is unknown to the compiler

- either because you forgot to #include a required header file or
- because of a typo
Search in all your .h files for 'm_pStoreNamespace' (would be the
definition of a struct or a class) and then #include this file.
HTH
Helmut Giese

Back to top
Ivan Johansen
Guest





PostPosted: Sun Mar 20, 2005 8:28 pm    Post subject: Re: W8066 Unreachable code Reply with quote

Standus wrote:
Quote:
But in finaly it dos not work.
So I rebuild it from begining and now its looking good except this error:
[C++ Error] Unit1.cpp(70): E2451 Undefined symbol 'm_pStoreNamespace'

You forgot the class name in the definition of AddFolders(). You will
also have to remove the default value from the definition:
void TForm1::AddFolders(STOREFOLDERID dwFolderId)


Ivan Johansen

Back to top
Standus
Guest





PostPosted: Sun Mar 20, 2005 10:49 pm    Post subject: Re: W8066 Unreachable code Reply with quote

Yes .... its working well.
Thank you very much Ivan.
Stan


"Ivan Johansen" <ng6 (AT) padowan (DOT) REMOVE.dk> píse v diskusním príspevku
news:423ddc67$1 (AT) newsgroups (DOT) borland.com...
Quote:
Standus wrote:
But in finaly it dos not work.
So I rebuild it from begining and now its looking good except this error:
[C++ Error] Unit1.cpp(70): E2451 Undefined symbol 'm_pStoreNamespace'

You forgot the class name in the definition of AddFolders(). You will also
have to remove the default value from the definition:
void TForm1::AddFolders(STOREFOLDERID dwFolderId)


Ivan Johansen



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language C++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.