Alien-FreeImage
view release on metacpan or search on metacpan
src/Source/LibJXR/common/include/wmsal.h view on Meta::CPAN
-- and modified.
);
LWSTDAPI_(BOOL) PathCompactPathExA(
__out_ecount(cchMax) LPSTR pszOut, -- A string buffer with cch elements that will
-- be NULL terminated on exit.
LPCSTR pszSrc, -- No annotation required, const implies __in.
UINT cchMax,
DWORD dwFlags
);
HRESULT SHLocalAllocBytes(
size_t cb,
__deref_bcount(cb) T **ppv -- A pointer whose dereference will be set to an
-- uninitialized buffer with cb bytes.
);
__inout_bcount_full(cb) : A buffer with cb elements that is fully initialized at
entry and exit, and may be written to by this function.
__out_ecount_part(count, *countOut) : A buffer with count elements that will be
partially initialized by this function. The function indicates how much it
initialized by setting *countOut.
-------------------------------------------------------------------------------
Advanced Annotations
Advanced annotations describe behavior that is not expressible with the regular
buffer macros. These may be used either to annotate buffer parameters that involve
complex or conditional behavior, or to enrich existing annotations with additional
information.
__success(expr) f :
<expr> indicates whether function f succeeded or not. If <expr> is true at exit,
all the function's guarantees (as given by other annotations) must hold. If <expr>
is false at exit, the caller should not expect any of the function's guarantees
to hold. If not used, the function must always satisfy its guarantees. Added
automatically to functions that indicate success in standard ways, such as by
returning an HRESULT.
__nullterminated p :
Pointer p is a buffer that may be read or written up to and including the first
NULL character or pointer. May be used on typedefs, which marks valid (properly
initialized) instances of that type as being NULL-terminated.
__nullnullterminated p :
Pointer p is a buffer that may be read or written up to and including the first
sequence of two NULL characters or pointers. May be used on typedefs, which marks
valid instances of that type as being double-NULL terminated.
__reserved v :
Value v must be 0/NULL, reserved for future use.
__checkReturn v :
Return value v must not be ignored by callers of this function.
__typefix(ctype) v :
Value v should be treated as an instance of ctype, rather than its declared type.
__override f :
Specify C#-style 'override' behaviour for overriding virtual methods.
__callback f :
Function f can be used as a function pointer.
__format_string p :
Pointer p is a string that contains % markers in the style of printf.
__blocksOn(resource) f :
Function f blocks on the resource 'resource'.
__fallthrough :
Annotates switch statement labels where fall-through is desired, to distinguish
from forgotten break statements.
-------------------------------------------------------------------------------
Advanced Annotation Examples
__success(return == TRUE) LWSTDAPI_(BOOL)
PathCanonicalizeA(__out_ecount(MAX_PATH) LPSTR pszBuf, LPCSTR pszPath) :
pszBuf is only guaranteed to be NULL-terminated when TRUE is returned.
typedef __nullterminated WCHAR* LPWSTR : Initialized LPWSTRs are NULL-terminated strings.
__out_ecount(cch) __typefix(LPWSTR) void *psz : psz is a buffer parameter which will be
a NULL-terminated WCHAR string at exit, and which initially contains cch WCHARs.
-------------------------------------------------------------------------------
*/
#pragma once
#ifndef __specstrings
#define __specstrings
#ifdef __cplusplus
#ifndef __nothrow
# define __nothrow __declspec(nothrow)
#endif
extern "C" {
#else
#ifndef __nothrow
# define __nothrow
#endif
#endif /* #ifdef __cplusplus */
/*
-------------------------------------------------------------------------------
Helper Macro Definitions
These express behavior common to many of the high-level annotations.
DO NOT USE THESE IN YOUR CODE.
-------------------------------------------------------------------------------
*/
/*
The helper annotations are only understood by the compiler version used by various
defect detection tools. When the regular compiler is running, they are defined into
nothing, and do not affect the compiled code.
*/
#if !defined(__midl) && defined(_PREFAST_)
/*
In the primitive __declspec("SAL_*") annotations "SAL" stands for Standard
Annotation Language. These __declspec("SAL_*") annotations are the
primitives the compiler understands and all high-level SpecString MACROs
will decompose into these primivates.
( run in 0.371 second using v1.01-cache-2.11-cpan-f6376fbd888 )