3

For example, the function definition of SetWindowPos used to be like so:

BOOL WINAPI SetWindowPos(
  _In_      HWND hWnd,
  _In_opt_  HWND hWndInsertAfter,
  _In_      int X,
  _In_      int Y,
  _In_      int cx,
  _In_      int cy,
  _In_      UINT uFlags
);

This used to be very clear on the calling convention and which parameters are optional/in/out, etc.

However, now the MSDN makes it much simpler, but drops the calling convention and SAL annotations like so:

BOOL SetWindowPos(
  HWND hWnd,
  HWND hWndInsertAfter,
  int  X,
  int  Y,
  int  cx,
  int  cy,
  UINT uFlags
);

Question: Is there anyway to see the SAL annotations and the calling convention now? Why did they think to remove it though?

user1720897
  • 1,216
  • 3
  • 12
  • 27
  • 2
    Offline help files still display SAL annotations and they are still used at actual declarations in header files. – user7860670 Mar 07 '20 at 12:49

1 Answers1

0

No, they didn't. With all do respect, I can see it. I am using MS 2019 Community installed well after this question was asked. And since no one answered, here are my 5 cents:

  • Type this function anywhere in your code, assuming it is in scope.

enter image description here

  • Select -> right-click -> Go To Declaration or hit Ctrl+F12.

enter image description here

  • And you should be send to WinUser.h

enter image description here

If you still can't see SAL annotation, try to upgrade the include files...
...or simply install newer VS.
Community is FREE!