Source code Annotation Language
-
Do you guys use Microsoft annotation language (SAL - sal.h) in your code? http://msdn2.microsoft.com/en-us/library/ms235402(VS.80).aspx[^] (example in atlcomcli.h: static bool LoadStringResource(__in HINSTANCE hInstance, __in UINT uID, __deref_out_opt BSTR& bstrText) throw() ) Would you consider it useful? or do you prefer PC-Lint http://www.gimpel.com/[^]? SAL's been around for a while now and is very useful for Prefast but MS is pushing this into user mode.
God bless, Ernest Laurentin
-
Do you guys use Microsoft annotation language (SAL - sal.h) in your code? http://msdn2.microsoft.com/en-us/library/ms235402(VS.80).aspx[^] (example in atlcomcli.h: static bool LoadStringResource(__in HINSTANCE hInstance, __in UINT uID, __deref_out_opt BSTR& bstrText) throw() ) Would you consider it useful? or do you prefer PC-Lint http://www.gimpel.com/[^]? SAL's been around for a while now and is very useful for Prefast but MS is pushing this into user mode.
God bless, Ernest Laurentin
:omg: No thanks. I'd much rather do something like:
/* Returns: Whether the string was loaded or not
* Param hInstance: The module's handler where the resource resides
* Param uID: The ID of the string to be loaded
* Param bstrText: A reference where the associated string will be loaded to
*/
static bool LoadStringResource(HINSTANCE hInstance, UINT uID, BSTR& bstrText);
Hope is the negation of reality - Raistlin Majere
-
:omg: No thanks. I'd much rather do something like:
/* Returns: Whether the string was loaded or not
* Param hInstance: The module's handler where the resource resides
* Param uID: The ID of the string to be loaded
* Param bstrText: A reference where the associated string will be loaded to
*/
static bool LoadStringResource(HINSTANCE hInstance, UINT uID, BSTR& bstrText);
Hope is the negation of reality - Raistlin Majere
Thanks for your response! Annotation is much more useful for static source code analysis (like PC-Lint)(or Prefast http://www.microsoft.com/whdc/devtools/tools/PREfast.mspx[^]).
God bless, Ernest Laurentin
-
Thanks for your response! Annotation is much more useful for static source code analysis (like PC-Lint)(or Prefast http://www.microsoft.com/whdc/devtools/tools/PREfast.mspx[^]).
God bless, Ernest Laurentin
They may help PREfast, but AFAIK PC-Lint doesn't need (or care) about them.
Anna :rose: Linting the day away :cool: Anna's Place | Tears and Laughter "If mushy peas are the food of the devil, the stotty cake is the frisbee of God"