#pragma once
#include <corecrt.h>
#include <stddef.h>
_CRT_BEGIN_C_HEADER
__pragma
(pack(push,
8
))
extern
"C"
{
typedef
int
(
__cdecl
*
_CoreCrtSecureSearchSortCompareFunction
)(
void
*,
void
const
*,
void
const
*);
typedef
int
(
__cdecl
*
_CoreCrtNonSecureSearchSortCompareFunction
)(
void
const
*,
void
const
*);
#if __STDC_WANT_SECURE_LIB__
_Check_return_
_ACRTIMP void* __cdecl bsearch_s(
__declspec
(dllimport)
void
*
__cdecl
(
_In_reads_bytes_(_NumOfElements * _SizeOfElements) void const* _Base,
_In_ rsize_t _NumOfElements,
_In_ rsize_t _SizeOfElements,
_In_ _CoreCrtSecureSearchSortCompareFunction _CompareFunction,
_CoreCrtSecureSearchSortCompareFunction
,
);
_ACRTIMP void __cdecl qsort_s(
__declspec
(dllimport)
void
__cdecl
(
_Inout_updates_bytes_(_NumOfElements * _SizeOfElements) void* _Base,
_In_ rsize_t _NumOfElements,
_In_ rsize_t _SizeOfElements,
_In_ _CoreCrtSecureSearchSortCompareFunction _CompareFunction,
_CoreCrtSecureSearchSortCompareFunction
,
);
#endif // __STDC_WANT_SECURE_LIB__
_Check_return_
_ACRTIMP void* __cdecl bsearch(
__declspec
(dllimport)
void
*
__cdecl
(
_In_reads_bytes_(_NumOfElements * _SizeOfElements) void const* _Base,
_In_ size_t _NumOfElements,
_In_ size_t _SizeOfElements,
_In_ _CoreCrtNonSecureSearchSortCompareFunction _CompareFunction
_CoreCrtNonSecureSearchSortCompareFunction
);
_ACRTIMP void __cdecl qsort(
__declspec
(dllimport)
void
__cdecl
(
_Inout_updates_bytes_(_NumOfElements * _SizeOfElements) void* _Base,
_In_ size_t _NumOfElements,
_In_ size_t _SizeOfElements,
_In_ _CoreCrtNonSecureSearchSortCompareFunction _CompareFunction
_CoreCrtNonSecureSearchSortCompareFunction
);
_Check_return_
_ACRTIMP void* __cdecl _lfind_s(
__declspec
(dllimport)
void
*
__cdecl
(
_In_reads_bytes_((*_NumOfElements) * _SizeOfElements) void const* _Base,
_Inout_ unsigned int* _NumOfElements,
_In_ size_t _SizeOfElements,
_In_ _CoreCrtSecureSearchSortCompareFunction _CompareFunction,
_CoreCrtSecureSearchSortCompareFunction
,
);
_Check_return_
_ACRTIMP void* __cdecl _lfind(
__declspec
(dllimport)
void
*
__cdecl
(
_In_reads_bytes_((*_NumOfElements) * _SizeOfElements) void const* _Base,
_Inout_ unsigned int* _NumOfElements,
_In_ unsigned int _SizeOfElements,
_In_ _CoreCrtNonSecureSearchSortCompareFunction _CompareFunction
_CoreCrtNonSecureSearchSortCompareFunction
);
_Check_return_
_ACRTIMP void* __cdecl _lsearch_s(
__declspec
(dllimport)
void
*
__cdecl
(
_Inout_updates_bytes_((*_NumOfElements ) * _SizeOfElements) void* _Base,
_Inout_ unsigned int* _NumOfElements,
_In_ size_t _SizeOfElements,
_In_ _CoreCrtSecureSearchSortCompareFunction _CompareFunction,
_CoreCrtSecureSearchSortCompareFunction
,
);
_Check_return_
_ACRTIMP void* __cdecl _lsearch(
__declspec
(dllimport)
void
*
__cdecl
(
_Inout_updates_bytes_((*_NumOfElements ) * _SizeOfElements) void* _Base,
_Inout_ unsigned int* _NumOfElements,
_In_ unsigned int _SizeOfElements,
_In_ _CoreCrtNonSecureSearchSortCompareFunction _CompareFunction
_CoreCrtNonSecureSearchSortCompareFunction
);
#if defined __cplusplus && defined _M_CEE
extern "C++"
{
typedef int (__clrcall* _CoreCrtMgdSecureSearchSortCompareFunction)(void*, void const*, void const*);
typedef int (__clrcall* _CoreCrtMgdNonSecureSearchSortCompareFunction)(void const*, void const*);
#if __STDC_WANT_SECURE_LIB__
_Check_return_
void* __clrcall bsearch_s(
_In_ void const* _Key,
_In_reads_bytes_(_NumOfElements * _SizeOfElements) void const* _Base,
_In_ rsize_t _NumOfElements,
_In_ rsize_t _SizeOfElements,
_In_ _CoreCrtMgdSecureSearchSortCompareFunction _CompareFunction,
_In_ void* _Context);
void __clrcall qsort_s(
_Inout_updates_bytes_(_NumOfElements * _SizeOfElements) void* _Base,
_In_ rsize_t _NumOfElements,
_In_ rsize_t _SizeOfElements,
_In_ _CoreCrtMgdSecureSearchSortCompareFunction _CompareFunction,
_In_ void* _Context);
#endif // __STDC_WANT_SECURE_LIB__
_Check_return_
void* __clrcall bsearch(
_In_ void const* _Key,
_In_reads_bytes_(_NumOfElements * _SizeOfElements) void const* _Base,
_In_ size_t _NumOfElements,
_In_ size_t _SizeOfElements,
_In_ _CoreCrtMgdNonSecureSearchSortCompareFunction _CompareFunction
);
_Check_return_
void* __clrcall _lfind_s(
_In_ void const* _Key,
_In_reads_bytes_(_NumOfElements * _SizeOfElements) void const* _Base,
_Inout_ unsigned int* _NumOfElements,
_In_ size_t _SizeOfElements,
_In_ _CoreCrtMgdSecureSearchSortCompareFunction _CompareFunction,
_In_ void* _Context
);
_Check_return_
void* __clrcall _lfind(
_In_ void const* _Key,
_In_reads_bytes_((*_NumOfElements) * _SizeOfElements) void const* _Base,
_Inout_ unsigned int* _NumOfElements,
_In_ unsigned int _SizeOfElements,
_In_ _CoreCrtMgdNonSecureSearchSortCompareFunction _CompareFunction
);
_Check_return_
void* __clrcall _lsearch_s(
_In_ void const* _Key,
_In_reads_bytes_((*_NumOfElements) * _SizeOfElements) void* _Base,
_In_ unsigned int* _NumOfElements,
_In_ size_t _SizeOfElements,
_In_ _CoreCrtMgdSecureSearchSortCompareFunction _CompareFunction,
_In_ void* _Context
);
_Check_return_
void* __clrcall _lsearch(
_In_ void const* _Key,
_Inout_updates_bytes_((*_NumOfElements) * _SizeOfElements) void* _Base,
_Inout_ unsigned int* _NumOfElements,
_In_ unsigned int _SizeOfElements,
_In_ _CoreCrtMgdNonSecureSearchSortCompareFunction _CompareFunction
);
void __clrcall qsort(
_Inout_updates_bytes_(_NumOfElements * _SizeOfElements) void* _Base,
_In_ size_t _NumOfElements,
_In_ size_t _SizeOfElements,
_In_ _CoreCrtMgdNonSecureSearchSortCompareFunction _CompareFunction
);
}
#endif // defined __cplusplus && defined _M_CEE
#if _CRT_INTERNAL_NONSTDC_NAMES
_Check_return_ _CRT_NONSTDC_DEPRECATE(_lfind)
__declspec
(deprecated(
"The POSIX name for this item is deprecated. Instead, use the ISO C "
"and C++ conformant name: "
"_lfind"
". See online help for details."
))
_ACRTIMP void* __cdecl lfind(
__declspec
(dllimport)
void
*
__cdecl
(
_In_reads_bytes_((*_NumOfElements) * _SizeOfElements) void const* _Base,
_Inout_ unsigned int* _NumOfElements,
_In_ unsigned int _SizeOfElements,
_In_ _CoreCrtNonSecureSearchSortCompareFunction _CompareFunction
_CoreCrtNonSecureSearchSortCompareFunction
);
_Check_return_ _CRT_NONSTDC_DEPRECATE(_lsearch)
__declspec
(deprecated(
"The POSIX name for this item is deprecated. Instead, use the ISO C "
"and C++ conformant name: "
"_lsearch"
". See online help for details."
))
_ACRTIMP void* __cdecl lsearch(
__declspec
(dllimport)
void
*
__cdecl
(
_Inout_updates_bytes_((*_NumOfElements) * _SizeOfElements) void* _Base,
_Inout_ unsigned int* _NumOfElements,
_In_ unsigned int _SizeOfElements,
_In_ _CoreCrtNonSecureSearchSortCompareFunction _CompareFunction
_CoreCrtNonSecureSearchSortCompareFunction
);
#endif // _CRT_INTERNAL_NONSTDC_NAMES