SAL

C/C++/MFC 2012. 11. 20. 15:02

SAL은 Microsoft's standard source code annotation language 의 약자이다.

MS에서 작성한 코드들을 보면 주석 처럼 달린 부분들을 볼 수 있는데 (아래 예제에 색칠해놓은 부분)


void MyPaintingFunction(
    __in HWND hwndControl,      // An initialized read-only parameter.
    __in_opt HDC hdcOptional,   // An initialized read-only parameter
                                //  that might be NULL.
    __inout IPropertyStore *ppsStore  // An initialized parameter that
                                // may be freeely used and modified.
);

<sal.h> 에 정의되어있다.


vs2012쪽 문서는 설명이 대충되어 있고 추가 설명을 위한 링크가 깨져있으므로. 자세하게 나와있는 vs2005 문서를 참고하자..

http://msdn.microsoft.com/en-us/library/ms235402(v=VS.80).aspx


__in, __out, __inout 같은것들이야 통박으로 알기 쉽지만, 생소한 것들이 많으니 첨접하는 api나 sdk 코드들을 좀 더 자세히 이해하기 위해서 알아두면 좋을것 같다.

Posted by 아..몰라 ㅡ.ㅡ+
,