Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8469149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:08:34+00:00 2026-06-10T16:08:34+00:00

So I have dipped my toes into source code annotations for C++, but discovered

  • 0

So I have dipped my toes into source code annotations for C++, but discovered there are many ways to Rome, so to speak.

Examples:

__in

_In_

[Pre(FormatString(Style="printf")] LPCSTR format
  • VS2005 SAL Annotations
  • VS2010 Using Annotations to Reduce C/C++ Code Defects
  • VS2012 Using SAL Annotations to Reduce C/C++ Code Defects

Is there one-microsoft-way to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T16:08:35+00:00Added an answer on June 10, 2026 at 4:08 pm

    Microsoft has introduced a new SAL standard (SAL 2.0) starting with Windows 81. SAL 2.0 uses the single underscore style of annotations, such as _In_opt_ among others. Thus, for all new code, the best practice would be to follow the SAL 2.0 style, as slides from Microsoft exhibit.

    For older code, the general rule of “stay consistent” seems to be the best way to go, but if you feel inclined to update all your annotations, again follow the SAL 2.0 style.

    —

    1 – SAL 2.0 has actually been around since 2010 (check the date on the linked presentation), but it hasn’t been officially supported externally until Windows 8, to the best of my knowledge.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just dipped my toes into the POSIX pond and tried out POSIX threads
have defined a Java Interface with the annotation @WebService Compiled the code which went
have numerous tests working, but my actual test of some objects is failing and
Have have this line of code in my form when I create a new
Have run into a bug with glibc's malloc(): http://sourceware.org/bugzilla/show_bug.cgi?id=4349 and am thinking a work
Have written all the code in a silverlight class library (dll) and linked this
Have a problem that seems easy on paper but i'm having a big problem
Have the following code: $(#blogs).mouseover( function () { $(this).addClass(hover); $(#home).removeClass(hover); $(#homepages).removeClass(hover); $(#apps).removeClass(hover); $(#facebook).removeClass(hover); $(#kontakt).removeClass(hover);
Have a problem, I'm about to rebuild the search feature on my site, but
Have the following code: String s= v.request(engine/?key=, P4z72NmBa91&method=load); JSONParser parser = new JSONParser(); Object

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.