Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / March 2006

Tip: Looking for answers? Try searching our database.

SAL annotations

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Egbert Nierop (MVP for IIS) - 10 Mar 2006 08:21 GMT
Are they really making any impact on produced code?

for instance if you look at the code below, in assembly it does not produce
any check. And if you set an annotation on them, it should expectingly
produce an error but it does not...

void dotest2(__in PCWSTR test, __in DWORD* test2)
{

AtlTrace(L"lal lala la %s\n", test);

test = L"puk";

*test2 = 1234;

}
Jochen Kalmbach [MVP] - 10 Mar 2006 08:27 GMT
Hi Egbert!

> Are they really making any impact on produced code?
>
> for instance if you look at the code below, in assembly it does not
> produce any check. And if you set an annotation on them, it should
> expectingly produce an error but it does not...

You must enabled the "/analyze" switch in your compiler setting!
Only if this setting is set, the sompiler will check the SAL annotations...

Greetings
  Jochen

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.