ReactOS 0.4.16-dev-753-g705a985
corecrt_internal.h File Reference
#include <corecrt.h>
#include <corecrt_startup.h>
#include <corecrt_terminate.h>
#include <corecrt_wctype.h>
#include <crtdbg.h>
#include <ctype.h>
#include <errno.h>
#include <excpt.h>
#include <internal_shared.h>
#include <limits.h>
#include <malloc.h>
#include <process.h>
#include <stdbool.h>
#include <stdlib.h>
#include <vcruntime_startup.h>
#include <windows.h>
#include <appmodel.h>
#include <corecrt_internal_state_isolation.h>
Include dependency graph for corecrt_internal.h:

Go to the source code of this file.

Classes

struct  __acrt_initializer
 
struct  __crt_locale_string_table
 
struct  __crt_locale_strings
 
struct  __crt_lc_time_data
 
struct  __crt_ctype_compatibility_data
 
struct  __crt_qualified_locale_data
 
struct  __crt_qualified_locale_data_downlevel
 
struct  __crt_multibyte_data
 
struct  __crt_locale_refcount
 
struct  __crt_locale_data
 
struct  __acrt_thread_parameter
 
struct  __acrt_ptd
 
struct  __crt_signal_action_t
 

Macros

#define _DEFINE_SET_FUNCTION(function_name, type, variable_name)
 
#define _CRT_LINKER_FORCE_INCLUDE(name)
 
#define _CRT_UNBOUNDED_BUFFER_SIZE   (static_cast<size_t>(-1))
 
#define _Maybe_unsafe_(buffer_annotation, expr)
 
#define _CORECRT_GENERATE_FORWARDER(prefix, callconv, name, callee_name)
 
#define DBGRPT_MAX_MSG   4096
 
#define DBGRPT_TOOLONGMSG   "_CrtDbgReport: String too long or IO Error"
 
#define DBGRPT_INVALIDMSG   "_CrtDbgReport: String too long or Invalid characters in String"
 
#define _COFFSET   127
 
#define MAX_LANG_LEN   64
 
#define MAX_CTRY_LEN   64
 
#define MAX_LC_LEN   (MAX_LANG_LEN + MAX_CTRY_LEN + 3)
 
#define MAX_CP_LEN   16
 
#define CATNAMES_LEN   57
 
#define LC_INT_TYPE   0
 
#define LC_STR_TYPE   1
 
#define LC_WSTR_TYPE   2
 
#define _WSETLOCALE_AVOID_SYNC_LOCALE_BIT   0x10
 
#define _PER_THREAD_LOCALE_BIT   0x2
 
#define _GLOBAL_LOCALE_BIT   0x1
 
#define _In_CRT_NLS_string_(size)
 
#define _CORECRT_SPINCOUNT   4000
 
#define _UCRT_HEAP_MISMATCH_DETECTION   0
 
#define _UCRT_HEAP_MISMATCH_RECOVERY   0
 
#define _UCRT_HEAP_MISMATCH_BREAK   0
 
#define _UCRT_HEAP_MISMATCH_ANY   (_UCRT_HEAP_MISMATCH_DETECTION || _UCRT_HEAP_MISMATCH_RECOVERY || _UCRT_HEAP_MISMATCH_BREAK)
 
#define _expand_crt   _expand
 
#define _strdup_crt   _strdup
 
#define _dupenv_s_crt   _dupenv_s
 
#define _wdupenv_s_crt   _wdupenv_s
 
#define _isleadbyte_l(_C, _L)   use_isleadbyte_fast_internal_instead_to_prevent_casting_errors()
 
#define _INVOKE_WATSON_IF_ERROR(expr)   _invoke_watson_if_error(expr, NULL, NULL, NULL, 0, 0)
 
#define _INVOKE_WATSON_IF_ONEOF(expr, errvalue1, errvalue2)   _invoke_watson_if_oneof((expr), (errvalue1), (errvalue2), NULL, NULL, NULL, 0, 0)
 
#define _ERRCHECK(e)   _INVOKE_WATSON_IF_ERROR(e)
 
#define _ERRCHECK_EINVAL(e)   _INVOKE_WATSON_IF_ONEOF(e, EINVAL, EINVAL)
 
#define _ERRCHECK_EINVAL_ERANGE(e)   _INVOKE_WATSON_IF_ONEOF(e, EINVAL, ERANGE)
 
#define _ERRCHECK_SPRINTF(_PrintfCall)
 
#define _SECURECRT_FILL_BUFFER   0
 
#define _SECURECRT_FILL_BUFFER_THRESHOLD   ((size_t)0)
 
#define _SECURECRT__FILL_STRING(_String, _Count, _Offset)
 
#define _SECURECRT__FILL_BYTE(_Position)
 
#define _VALIDATE_STREAM_ANSI_RETURN(stream, errorcode, retexpr)
 
#define _CHECK_FH_RETURN(handle, errorcode, retexpr)
 
#define _CHECK_FH_CLEAR_OSSERR_RETURN(handle, errorcode, retexpr)
 
#define _CHECK_FH_CLEAR_OSSERR_RETURN_ERRCODE(handle, retexpr)
 
#define _REDIRECT_TO_L_VERSION_FUNC_PROLOGUE
 
#define _REDIRECT_TO_L_VERSION_1(_ReturnType, _FunctionName, _Type1)
 
#define _REDIRECT_TO_L_VERSION_2(_ReturnType, _FunctionName, _Type1, _Type2)
 
#define _REDIRECT_TO_L_VERSION_3(_ReturnType, _FunctionName, _Type1, _Type2, _Type3)
 
#define _REDIRECT_TO_L_VERSION_4(_ReturnType, _FunctionName, _Type1, _Type2, _Type3, _Type4)
 

Typedefs

typedef bool(__cdecl__acrt_uninitialize_pft) (bool)
 
typedef struct __acrt_initializer __acrt_initializer
 
typedef struct __crt_locale_string_table __crt_locale_string_table
 
typedef struct __crt_locale_strings __crt_locale_strings
 
typedef struct __crt_lc_time_data __crt_lc_time_data
 
typedef struct __crt_ctype_compatibility_data __crt_ctype_compatibility_data
 
typedef struct __crt_qualified_locale_data __crt_qualified_locale_data
 
typedef struct __crt_qualified_locale_data_downlevel __crt_qualified_locale_data_downlevel
 
typedef struct __crt_multibyte_data __crt_multibyte_data
 
typedef struct __crt_locale_refcount __crt_locale_refcount
 
typedef struct __crt_locale_data __crt_locale_data
 
typedef struct __acrt_thread_parameter __acrt_thread_parameter
 
typedef struct __acrt_ptd __acrt_ptd
 
typedef enum __acrt_lock_id __acrt_lock_id
 
typedef void(__cdecl__crt_signal_handler_t) (int)
 

Enumerations

enum  __acrt_lock_id {
  __acrt_heap_lock , __acrt_debug_lock , __acrt_exit_lock , __acrt_signal_lock ,
  __acrt_locale_lock , __acrt_multibyte_cp_lock , __acrt_time_lock , __acrt_lowio_index_lock ,
  __acrt_stdio_index_lock , __acrt_conio_lock , __acrt_popen_lock , __acrt_environment_lock ,
  __acrt_tempnam_lock , __acrt_os_exit_lock , __acrt_lock_count
}
 
enum  process_end_policy { process_end_policy_terminate_process , process_end_policy_exit_process }
 
enum  begin_thread_init_policy { begin_thread_init_policy_unknown , begin_thread_init_policy_none , begin_thread_init_policy_ro_initialize }
 
enum  developer_information_policy { developer_information_policy_unknown , developer_information_policy_none , developer_information_policy_ui }
 
enum  windowing_model_policy {
  windowing_model_policy_unknown , windowing_model_policy_hwnd , windowing_model_policy_corewindow , windowing_model_policy_legacyphone ,
  windowing_model_policy_none
}
 

Functions

_Ret_z_ __inline char const_get_sys_err_msg (size_t const m)
 
 _Success_ (return !=0) char *__cdecl __acrt_getpath(_In_z_ char const *delimited_paths
 
 _Out_writes_z_ (buffer_count) char *buffer
 
 _Success_ (return==0) errno_t __acrt_expand_narrow_argv_wildcards(_In_z_ char **argv
 Deletes the virtual mapping and optionally gives back the page & dirty bit.
 
int __cdecl __acrt_pack_narrow_command_line_and_environment (_In_z_ char const *const *argv, _In_opt_z_ char const *const *envp, _Outptr_result_maybenull_ char **command_line_result, _Outptr_result_maybenull_ char **environment_block_result)
 
int __cdecl __acrt_pack_wide_command_line_and_environment (_In_z_ wchar_t const *const *argv, _In_opt_z_ wchar_t const *const *envp, _Outptr_result_maybenull_ wchar_t **command_line_result, _Outptr_result_maybenull_ wchar_t **environment_block_result)
 
_Ret_z_ _In_z_ char const _When_ (return==caller_array, _Post_z_) _Out_writes_(caller_array_count) char **caller_array
 
void __cdecl __acrt_call_reportfault (int nDbgHookCode, DWORD dwExceptionCode, DWORD dwExceptionFlags)
 
BOOL __cdecl __acrt_CreateProcessA (_In_opt_ LPCSTR lpApplicationName, _Inout_opt_ LPSTR lpCommandLine, _In_opt_ LPSECURITY_ATTRIBUTES lpProcessAttributes, _In_opt_ LPSECURITY_ATTRIBUTES lpThreadAttributes, _In_ BOOL bInheritHandles, _In_ DWORD dwCreationFlags, _In_opt_ LPVOID lpEnvironment, _In_opt_ LPCSTR lpCurrentDirectory, _In_ LPSTARTUPINFOW lpStartupInfo, _Out_ LPPROCESS_INFORMATION lpProcessInformation)
 
 _Success_ (return > 0) DWORD __cdecl __acrt_GetTempPath2A(DWORD nBufferLength
 
 _Out_writes_to_ (nBufferLength, return+1) PSTR lpBuffer)
 
DWORD __cdecl __acrt_GetModuleFileNameA (_In_opt_ HMODULE hModule, _When_(return< nSize, _Out_writes_to_(nSize, return+1)) _When_(return==nSize, _Out_writes_all_(nSize) _Null_terminated_) char *lpFilename, _In_range_(1, MAX_PATH) DWORD nSize)
 
HMODULE __cdecl __acrt_LoadLibraryExA (_In_ LPCSTR lpFileName, _Reserved_ HANDLE hFile, _In_ DWORD dwFlags)
 
BOOL __cdecl __acrt_SetEnvironmentVariableA (_In_ LPCSTR lpName, _In_opt_ LPCSTR lpValue)
 
BOOL __cdecl __acrt_SetCurrentDirectoryA (_In_ LPCSTR lpPathName)
 
typedef bool (__cdecl *__acrt_initialize_pft)(void)
 
bool __cdecl __acrt_execute_initializers (_In_reads_(last - first) _In_ __acrt_initializer const *first, _In_reads_(0) __acrt_initializer const *last)
 
bool __cdecl __acrt_execute_uninitializers (_In_reads_(last - first) __acrt_initializer const *first, _In_reads_(0) __acrt_initializer const *last)
 
void __cdecl __acrt_report_runtime_error (_In_z_ wchar_t const *message)
 
int __cdecl __acrt_show_narrow_message_box (_In_opt_z_ char const *text, _In_opt_z_ char const *caption, _In_ unsigned type)
 
int __cdecl __acrt_show_wide_message_box (_In_opt_z_ wchar_t const *text, _In_opt_z_ wchar_t const *caption, _In_ unsigned type)
 
bool __cdecl __acrt_initialize_winapi_thunks (void)
 
bool __cdecl __acrt_uninitialize_winapi_thunks (_In_ bool terminating)
 
bool __cdecl __acrt_initialize_locks (void)
 
bool __cdecl __acrt_uninitialize_locks (_In_ bool terminating)
 
bool __cdecl __acrt_initialize_heap (void)
 
bool __cdecl __acrt_uninitialize_heap (_In_ bool terminating)
 
bool __cdecl __acrt_initialize_ptd (void)
 
bool __cdecl __acrt_uninitialize_ptd (_In_ bool terminating)
 
bool __cdecl __acrt_initialize_lowio (void)
 
bool __cdecl __acrt_uninitialize_lowio (_In_ bool terminating)
 
bool __cdecl __acrt_initialize_command_line (void)
 
bool __cdecl __acrt_uninitialize_command_line (_In_ bool terminating)
 
void __cdecl __acrt_initialize_invalid_parameter_handler (_In_opt_ void *encoded_null)
 
void __cdecl __acrt_initialize_new_handler (_In_opt_ void *encoded_null)
 
void __cdecl __acrt_initialize_signal_handlers (_In_opt_ void *encoded_null)
 
void __cdecl __acrt_initialize_thread_local_exit_callback (_In_opt_ void *encoded_null)
 
int __cdecl __acrt_CompareStringA (_In_opt_ _locale_t _Plocinfo, _In_ LPCWSTR _LocaleName, _In_ DWORD _DwCmpFlags, _In_CRT_NLS_string_(_CchCount1) PCCH _LpString1, _In_ int _CchCount1, _In_CRT_NLS_string_(_CchCount2) PCCH _LpString2, _In_ int _CchCount2, _In_ int _CodePage)
 
int __cdecl __acrt_CompareStringW (_In_ LPCWSTR _LocaleName, _In_ DWORD _DwCmpFlags, _In_CRT_NLS_string_(_CchCount1) PCWCH _LpString1, _In_ int _CchCount1, _In_CRT_NLS_string_(_CchCount2) PCWCH _LpString2, _In_ int _CchCount2)
 
int __cdecl __acrt_GetLocaleInfoA (_In_opt_ _locale_t _Locale, _In_ int _LCType, _In_ LPCWSTR _LocaleName, _In_ LCTYPE _FieldType, _Out_ void *_Address)
 
_In_ DWORD _In_NLS_string_ (_CchSrc) PCCH _LpSrcStr
 
_In_ LPCWSTR _In_ DWORD _In_CRT_NLS_string_ (_CchSrc) PCCH _LpSrcStr
 
_In_ LPCWSTR _In_ DWORD _In_ int _Out_writes_opt_ (_CchDest) PCH _LpDestStr
 
_In_ DWORD _In_ LPCSTR _In_ int _Out_writes_opt_ (_CchWideChar) LPWSTR _LpWideCharStr
 
_In_ DWORD _In_ LPCWSTR _In_ int _Out_writes_opt_ (_CbMultiByte) LPSTR _LpMultiByteStr
 
_Check_return_ int __cdecl __ascii_memicmp (_In_reads_bytes_(count) void const *lhs, _In_reads_bytes_(count) void const *rhs, _In_ size_t count)
 
_Check_return_ int __cdecl __ascii_stricmp (_In_z_ char const *lhs, _In_z_ char const *rhs)
 
_Check_return_ int __cdecl __ascii_strnicmp (_In_reads_or_z_(count) char const *lhs, _In_reads_or_z_(count) char const *rhs, _In_ size_t count)
 
_Check_return_ int __cdecl __ascii_wcsicmp (_In_z_ const wchar_t *lhs, _In_z_ const wchar_t *rhs)
 
_Check_return_ int __cdecl __ascii_wcsnicmp (_In_reads_or_z_(count) const wchar_t *lhs, _In_reads_or_z_(count) const wchar_t *rhs, _In_ size_t count)
 
void __cdecl __acrt_add_locale_ref (__crt_locale_data *)
 
void __cdecl __acrt_release_locale_ref (__crt_locale_data *)
 
void __cdecl __acrt_free_locale (__crt_locale_data *)
 
long __cdecl __acrt_locale_add_lc_time_reference (_In_opt_ __crt_lc_time_data const *lc_time)
 
long __cdecl __acrt_locale_release_lc_time_reference (_In_opt_ __crt_lc_time_data const *lc_time)
 
void __cdecl __acrt_locale_free_lc_time_if_unreferenced (_In_opt_ __crt_lc_time_data const *lc_time)
 
void __cdecl __acrt_locale_free_monetary (_Inout_ struct lconv *lconv)
 
void __cdecl __acrt_locale_free_numeric (_Inout_ struct lconv *lconv)
 
void __cdecl __acrt_locale_free_time (_Inout_opt_ __crt_lc_time_data *lc_time_data)
 
__crt_locale_data *__cdecl __acrt_update_thread_locale_data (void)
 
__crt_multibyte_data *__cdecl __acrt_update_thread_multibyte_data (void)
 
void __cdecl __acrt_set_locale_changed (void)
 
bool __cdecl __acrt_initialize_multibyte (void)
 
__inline int __CRTDECL __acrt_isleadbyte_l_noupdate (_In_ int const c, _In_ _locale_t const locale)
 
void __cdecl __acrt_initialize_user_matherr (void *encoded_null)
 
bool __cdecl __acrt_has_user_matherr (void)
 
int __cdecl __acrt_invoke_user_matherr (struct _exception *)
 
__acrt_ptd *__cdecl __acrt_getptd (void)
 
__acrt_ptd *__cdecl __acrt_getptd_head (void)
 
__acrt_ptd *__cdecl __acrt_getptd_noexit (void)
 
void __cdecl __acrt_freeptd (void)
 
void __cdecl __acrt_errno_map_os_error (unsigned long)
 
int __cdecl __acrt_errno_from_os_error (unsigned long)
 
void __cdecl __acrt_lock (_In_ __acrt_lock_id lock)
 
void __cdecl __acrt_unlock (_In_ __acrt_lock_id lock)
 
_Check_return_ _Ret_maybenull_ _Post_writable_byte_size_ (size) void *__cdecl _expand_base(_Pre_notnull_ void *block
 
BOOL WINAPI __acrt_AreFileApisANSI (void)
 
int WINAPI __acrt_CompareStringEx (_In_opt_ LPCWSTR locale_name, _In_ DWORD flags, _In_NLS_string_(string1_count) LPCWCH string1, _In_ int string1_count, _In_NLS_string_(string2_count) LPCWCH string2, _In_ int string2_count, _Reserved_ LPNLSVERSIONINFO version, _Reserved_ LPVOID reserved, _Reserved_ LPARAM param)
 
BOOL WINAPI __acrt_EnumSystemLocalesEx (_In_ LOCALE_ENUMPROCEX enum_proc, _In_ DWORD flags, _In_ LPARAM param, _In_opt_ LPVOID reserved)
 
DWORD WINAPI __acrt_FlsAlloc (_In_opt_ PFLS_CALLBACK_FUNCTION lpCallback)
 
BOOL WINAPI __acrt_FlsFree (_In_ DWORD dwFlsIndex)
 
PVOID WINAPI __acrt_FlsGetValue (_In_ DWORD dwFlsIndex)
 
BOOL WINAPI __acrt_FlsSetValue (_In_ DWORD dwFlsIndex, _In_opt_ PVOID lpFlsData)
 
int WINAPI __acrt_GetDateFormatEx (_In_opt_ LPCWSTR locale_name, _In_ DWORD flags, _In_opt_ SYSTEMTIME CONST *date, _In_opt_ LPCWSTR format, _Out_writes_opt_(buffer_count) LPWSTR buffer, _In_opt_ int buffer_count, _In_opt_ LPCWSTR calendar)
 
int WINAPI __acrt_GetTempPath2W (_In_ DWORD nBufferLength, _Out_writes_to_opt_(BufferLength, return+1) LPWSTR lpBuffer)
 
DWORD64 WINAPI __acrt_GetEnabledXStateFeatures (void)
 
int WINAPI __acrt_GetLocaleInfoEx (_In_opt_ LPCWSTR locale_name, _In_ LCTYPE lc_type, _Out_writes_opt_(data_count) LPWSTR data, _In_ int data_count)
 
VOID WINAPI __acrt_GetSystemTimePreciseAsFileTime (_Out_ LPFILETIME system_time)
 
int WINAPI __acrt_GetTimeFormatEx (_In_opt_ LPCWSTR locale_name, _In_ DWORD flags, _In_opt_ SYSTEMTIME CONST *time, _In_opt_ LPCWSTR format, _Out_writes_opt_(buffer_count) LPWSTR buffer, _In_opt_ int buffer_count)
 
int WINAPI __acrt_GetUserDefaultLocaleName (_Out_writes_(locale_name_count) LPWSTR locale_name, _In_ int locale_name_count)
 
_Must_inspect_result_ BOOL WINAPI __acrt_GetXStateFeaturesMask (_In_ PCONTEXT context, _Out_ PDWORD64 feature_mask)
 
BOOL WINAPI __acrt_InitializeCriticalSectionEx (_Out_ LPCRITICAL_SECTION critical_section, _In_ DWORD spin_count, _In_ DWORD flags)
 
BOOL WINAPI __acrt_IsValidLocaleName (_In_ LPCWSTR locale_name)
 
int WINAPI __acrt_LCMapStringEx (_In_opt_ LPCWSTR locale_name, _In_ DWORD flags, _In_CRT_NLS_string_(source_count) LPCWSTR source, _In_ int source_count, _Out_writes_opt_(destination_count) LPWSTR destination, _In_ int destination_count, _In_opt_ LPNLSVERSIONINFO version, _In_opt_ LPVOID reserved, _In_opt_ LPARAM sort_handle)
 
int WINAPI __acrt_LCIDToLocaleName (_In_ LCID locale, _Out_writes_opt_(name_count) LPWSTR name, _In_ int name_count, _In_ DWORD flags)
 
DWORD WINAPI __acrt_LocaleNameToLCID (_In_ LPCWSTR name, _In_ DWORD flags)
 
int WINAPI __acrt_MessageBoxA (_In_opt_ HWND hwnd, _In_opt_ LPCSTR text, _In_opt_ LPCSTR caption, _In_ UINT type)
 
int WINAPI __acrt_MessageBoxW (_In_opt_ HWND hwnd, _In_opt_ LPCWSTR text, _In_opt_ LPCWSTR caption, _In_ UINT type)
 
void WINAPI __acrt_OutputDebugStringA (_In_opt_ LPCSTR text)
 
void WINAPI __acrt_RoUninitialize (void)
 
LONG WINAPI __acrt_AppPolicyGetProcessTerminationMethodInternal (_Out_ AppPolicyProcessTerminationMethod *policy)
 
LONG WINAPI __acrt_AppPolicyGetThreadInitializationTypeInternal (_Out_ AppPolicyThreadInitializationType *policy)
 
LONG WINAPI __acrt_AppPolicyGetShowDeveloperDiagnosticInternal (_Out_ AppPolicyShowDeveloperDiagnostic *policy)
 
LONG WINAPI __acrt_AppPolicyGetWindowingModelInternal (_Out_ AppPolicyWindowingModel *policy)
 
BOOL WINAPI __acrt_SetThreadStackGuarantee (_Inout_ PULONG stack_size_in_bytes)
 
bool __cdecl __acrt_can_show_message_box (void)
 
bool __cdecl __acrt_can_use_vista_locale_apis (void)
 
void __cdecl __acrt_eagerly_load_locale_apis (void)
 
bool __cdecl __acrt_can_use_xstate_apis (void)
 
HWND __cdecl __acrt_get_parent_window (void)
 
bool __cdecl __acrt_is_interactive (void)
 
bool __cdecl __acrt_app_verifier_enabled (void)
 
bool __cdecl __acrt_is_secure_process (void)
 
LCID __cdecl __acrt_DownlevelLocaleNameToLCID (_In_opt_ LPCWSTR localeName)
 
 _Out_writes_opt_z_ (cchLocaleName) LPWSTR outLocaleName
 
__crt_signal_handler_t __cdecl __acrt_get_sigabrt_handler (void)
 
_Ret_opt_z_ char *__cdecl __dcrt_get_narrow_environment_from_os (void) _CRT_NOEXCEPT
 
_Ret_opt_z_ wchar_t *__cdecl __dcrt_get_wide_environment_from_os (void) _CRT_NOEXCEPT
 
_Deref_ret_opt_z_ char **__cdecl __dcrt_get_or_create_narrow_environment_nolock (void)
 
_Deref_ret_opt_z_ wchar_t **__cdecl __dcrt_get_or_create_wide_environment_nolock (void)
 
void __cdecl __dcrt_uninitialize_environments_nolock (void)
 
int __cdecl __dcrt_set_variable_in_narrow_environment_nolock (_In_ _Post_invalid_ char *option, _In_ int is_top_level_call)
 
int __cdecl __dcrt_set_variable_in_wide_environment_nolock (_In_ _Post_invalid_ wchar_t *option, _In_ int is_top_level_call)
 
_Check_return_ __forceinline unsigned char __cdecl _toupper_fast_internal (_In_ unsigned char const c, _In_ _locale_t const locale)
 
_Check_return_ __forceinline unsigned char __cdecl _tolower_fast_internal (_In_ unsigned char const c, _In_ _locale_t const locale)
 
_Check_return_ __forceinline wint_t _towupper_fast_internal (_In_ unsigned char const c, _In_ _locale_t const locale)
 
_Check_return_ wint_t _towupper_internal (_In_ unsigned short const c, _In_ _locale_t const locale)
 
_Check_return_ __forceinline wint_t _towlower_fast_internal (_In_ unsigned char const c, _In_ _locale_t const locale)
 
_Check_return_ wint_t _towlower_internal (_In_ unsigned short const c, _In_ _locale_t const locale)
 
_Check_return_ __forceinline unsigned short __cdecl _ctype_fast_check_internal (_In_ unsigned char const c, _In_ int const _Mask, _In_ _locale_t const locale)
 
_Check_return_ __forceinline unsigned short __cdecl _isdigit_fast_internal (_In_ unsigned char const c, _In_ _locale_t const locale)
 
_Check_return_ __forceinline unsigned short __cdecl _isleadbyte_fast_internal (_In_ unsigned char const c, _In_ _locale_t const locale)
 
_CRT_SECURITYCRITICAL_ATTRIBUTE __forceinline void _invoke_watson_if_error (_In_ errno_t expression_error, _In_opt_z_ wchar_t const *expression, _In_opt_z_ wchar_t const *function_name, _In_opt_z_ wchar_t const *file_name, _In_ unsigned int line_number, _In_ uintptr_t reserved)
 
__forceinline errno_t _invoke_watson_if_oneof (_In_ errno_t expression_error, _In_ errno_t error_value1, _In_ errno_t error_value2, _In_opt_z_ wchar_t const *expression, _In_opt_z_ wchar_t const *function_name, _In_opt_z_ wchar_t const *file_name, _In_ unsigned int line_number, _In_ uintptr_t reserved)
 
process_end_policy __cdecl __acrt_get_process_end_policy (void)
 
begin_thread_init_policy __cdecl __acrt_get_begin_thread_init_policy (void)
 
developer_information_policy __cdecl __acrt_get_developer_information_policy (void)
 
windowing_model_policy __cdecl __acrt_get_windowing_model_policy (void)
 

Variables

size_t const _sys_first_posix_error
 
size_t const _sys_last_posix_error
 
char const *const _sys_posix_errlist []
 
_In_ size_t buffer_count
 
_Out_ _Deref_post_z_ char *** result
 
_Ret_z_ _In_z_ char constfirst_argument
 
_Ret_z_ _In_z_ char const _In_ size_t caller_array_count
 
_CRT_ALLOC_HOOK _pfnAllocHook
 
_In_ size_t character_count
 
_In_ size_t _In_ size_t character_size
 
_In_ DWORD _DWInfoType
 
_In_ DWORD _In_ int _CchSrc
 
_In_ DWORD _In_ int _Out_ LPWORD _LpCharType
 
_In_ DWORD _In_ int _Out_ LPWORD _In_ int _CodePage
 
_In_ DWORD _In_ int _Out_ LPWORD _In_ int _In_ BOOL _BError
 
_In_ LPCWSTR _LocaleName
 
_In_ LPCWSTR _In_ DWORD _DwMapFlag
 
_In_ LPCWSTR _In_ DWORD _In_ int _In_ int _CchDest
 
_In_ DWORD _DWMapFlag
 
_In_ DWORD _DWFlags
 
_In_ DWORD _In_ LPCSTR _LpMultiByteStr
 
_In_ DWORD _In_ LPCSTR _In_ int _CbMultiByte
 
_In_ DWORD _In_ LPCSTR _In_ int _In_ int _CchWideChar
 
_In_ DWORD _In_ LPCWSTR _LpWideCharStr
 
_In_ DWORD _In_ LPCWSTR _In_ int _In_ int _In_opt_ LPCSTR _LpDefaultChar
 
_In_ DWORD _In_ LPCWSTR _In_ int _In_ int _In_opt_ LPCSTR _Out_opt_ LPBOOL _LpUsedDefaultChar
 
_Out_opt_ UINTcode_page
 
_Out_opt_ UINT _Out_opt_ __crt_locale_stringsresult_strings
 
long __acrt_locale_changed_data
 
__crt_locale_string_table const __acrt_rg_language []
 
size_t const __acrt_rg_language_count
 
__crt_locale_string_table const __acrt_rg_country []
 
size_t const __acrt_rg_country_count
 
struct lconv __acrt_lconv_c
 
__crt_lc_time_data const __lc_time_c
 
__crt_multibyte_data __acrt_initial_multibyte_data
 
__crt_locale_data __acrt_initial_locale_data
 
__crt_locale_pointers __acrt_initial_locale_pointers
 
struct lconv__acrt_lconv
 
unsigned short const __newctype []
 
unsigned char const __newclmap []
 
unsigned char const __newcumap []
 
wchar_t __acrt_wide_c_locale_string []
 
int __globallocalestatus
 
HANDLE __acrt_heap
 
_Check_return_ _Ret_maybenull_ _In_ size_t size
 
_In_ DWORD feature_id
 
_In_ DWORD _Out_opt_ PDWORD length
 
_In_ int cchLocaleName
 
struct __crt_signal_action_t const __acrt_exception_action_table []
 
size_t const __acrt_signal_action_table_count
 
size_t const __acrt_signal_action_table_size
 
size_t const __acrt_signal_action_first_fpe_index
 
size_t const __acrt_signal_action_fpe_count
 
wchar_t ** __dcrt_initial_wide_environment
 
char ** __dcrt_initial_narrow_environment
 
const unsigned short _wctype []
 

Macro Definition Documentation

◆ _CHECK_FH_CLEAR_OSSERR_RETURN

#define _CHECK_FH_CLEAR_OSSERR_RETURN (   handle,
  errorcode,
  retexpr 
)
Value:
{ \
{ \
_doserrno = 0L; \
errno = errorcode; \
return ( retexpr ); \
} \
}
#define _doserrno
Definition: stdlib.h:131
#define L(x)
Definition: ntvdm.h:50
#define errno
Definition: errno.h:18
#define _NO_CONSOLE_FILENO
Definition: internal.h:92

Definition at line 1739 of file corecrt_internal.h.

◆ _CHECK_FH_CLEAR_OSSERR_RETURN_ERRCODE

#define _CHECK_FH_CLEAR_OSSERR_RETURN_ERRCODE (   handle,
  retexpr 
)
Value:
{ \
{ \
_doserrno = 0L; \
return ( retexpr ); \
} \
}

Definition at line 1749 of file corecrt_internal.h.

◆ _CHECK_FH_RETURN

#define _CHECK_FH_RETURN (   handle,
  errorcode,
  retexpr 
)
Value:
{ \
{ \
errno = errorcode; \
return ( retexpr ); \
} \
}

Definition at line 1730 of file corecrt_internal.h.

◆ _COFFSET

#define _COFFSET   127

Definition at line 394 of file corecrt_internal.h.

◆ _CORECRT_GENERATE_FORWARDER

#define _CORECRT_GENERATE_FORWARDER (   prefix,
  callconv,
  name,
  callee_name 
)
Value:
__pragma(warning(disable: 4100)) /* unreferenced formal parameter */ \
template <typename... Params> \
prefix auto callconv name(Params&&... args) throw() -> decltype(callee_name(args...)) \
{ \
_BEGIN_SECURE_CRT_DEPRECATION_DISABLE \
return callee_name(args...); \
} \
__pragma(warning(pop))
#define _END_SECURE_CRT_DEPRECATION_DISABLE
int disable
Definition: msacm.c:1365
static calc_node_t * pop(void)
Definition: rpn_ieee.c:90
static void push(calc_node_t *op)
Definition: rpn_ieee.c:113
#define __pragma(x)
Definition: debug.h:260
#define warning(s)
Definition: debug.h:83
Definition: match.c:390
Definition: name.c:39
Character const *const prefix
Definition: tempnam.cpp:195
_In_ WDFIOTARGET _In_ PWDF_REQUEST_COMPLETION_PARAMS Params
Definition: wdfrequest.h:308

Definition at line 115 of file corecrt_internal.h.

◆ _CORECRT_SPINCOUNT

#define _CORECRT_SPINCOUNT   4000

Definition at line 955 of file corecrt_internal.h.

◆ _CRT_LINKER_FORCE_INCLUDE

#define _CRT_LINKER_FORCE_INCLUDE (   name)
Value:
__pragma(comment(linker, \
"/include:" \
_CRT_LINKER_SYMBOL_PREFIX #name \
))
#define comment(fmt, arg1)
Definition: rebar.c:847

Definition at line 53 of file corecrt_internal.h.

◆ _CRT_UNBOUNDED_BUFFER_SIZE

#define _CRT_UNBOUNDED_BUFFER_SIZE   (static_cast<size_t>(-1))

Definition at line 72 of file corecrt_internal.h.

◆ _DEFINE_SET_FUNCTION

#define _DEFINE_SET_FUNCTION (   function_name,
  type,
  variable_name 
)
Value:
{ \
__pragma(warning(push)) \
__pragma(warning(disable:4996)) \
variable_name = value; \
__pragma(warning(pop)) \
}
#define __inline
Definition: _wctype.cpp:15
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
wchar_t const *const function_name
Definition: pdh_main.c:94

Definition at line 34 of file corecrt_internal.h.

◆ _dupenv_s_crt

#define _dupenv_s_crt   _dupenv_s

Definition at line 1015 of file corecrt_internal.h.

◆ _ERRCHECK

#define _ERRCHECK (   e)    _INVOKE_WATSON_IF_ERROR(e)

Definition at line 1639 of file corecrt_internal.h.

◆ _ERRCHECK_EINVAL

#define _ERRCHECK_EINVAL (   e)    _INVOKE_WATSON_IF_ONEOF(e, EINVAL, EINVAL)

Definition at line 1640 of file corecrt_internal.h.

◆ _ERRCHECK_EINVAL_ERANGE

#define _ERRCHECK_EINVAL_ERANGE (   e)    _INVOKE_WATSON_IF_ONEOF(e, EINVAL, ERANGE)

Definition at line 1641 of file corecrt_internal.h.

◆ _ERRCHECK_SPRINTF

#define _ERRCHECK_SPRINTF (   _PrintfCall)
Value:
{ \
errno_t _SaveErrno = errno; \
errno = 0; \
if ((_PrintfCall) < 0) \
{ \
_ERRCHECK_EINVAL_ERANGE(errno); \
} \
errno = _SaveErrno; \
}
int errno_t
Definition: corecrt.h:615

Definition at line 1643 of file corecrt_internal.h.

◆ _expand_crt

#define _expand_crt   _expand

Definition at line 1011 of file corecrt_internal.h.

◆ _GLOBAL_LOCALE_BIT

#define _GLOBAL_LOCALE_BIT   0x1

Definition at line 410 of file corecrt_internal.h.

◆ _In_CRT_NLS_string_

#define _In_CRT_NLS_string_ (   size)
Value:
_When_((size) < 0, _In_z_) \
_When_((size) >= _String_length_(_Curr_), _Pre_z_) \
_When_((size) < _String_length_(_Curr_), _In_reads_(size))
GLsizeiptr size
Definition: glext.h:5919
#define _In_reads_(s)
Definition: no_sal2.h:168
#define _In_z_
Definition: no_sal2.h:164
#define _Pre_z_
Definition: no_sal2.h:506
#define _When_(c, a)
Definition: no_sal2.h:38

Definition at line 525 of file corecrt_internal.h.

◆ _INVOKE_WATSON_IF_ERROR

#define _INVOKE_WATSON_IF_ERROR (   expr)    _invoke_watson_if_error(expr, NULL, NULL, NULL, 0, 0)

Definition at line 1635 of file corecrt_internal.h.

◆ _INVOKE_WATSON_IF_ONEOF

#define _INVOKE_WATSON_IF_ONEOF (   expr,
  errvalue1,
  errvalue2 
)    _invoke_watson_if_oneof((expr), (errvalue1), (errvalue2), NULL, NULL, NULL, 0, 0)

Definition at line 1636 of file corecrt_internal.h.

◆ _isleadbyte_l

#define _isleadbyte_l (   _C,
  _L 
)    use_isleadbyte_fast_internal_instead_to_prevent_casting_errors()

Definition at line 1574 of file corecrt_internal.h.

◆ _Maybe_unsafe_

#define _Maybe_unsafe_ (   buffer_annotation,
  expr 
)
Value:
_When_((expr < _CRT_UNBOUNDED_BUFFER_SIZE), buffer_annotation(expr)) \
_When_((expr >= _CRT_UNBOUNDED_BUFFER_SIZE), buffer_annotation(_Inexpressible_("unsafe")))
#define _CRT_UNBOUNDED_BUFFER_SIZE
Definition: query.h:86

Definition at line 73 of file corecrt_internal.h.

◆ _PER_THREAD_LOCALE_BIT

#define _PER_THREAD_LOCALE_BIT   0x2

Definition at line 409 of file corecrt_internal.h.

◆ _REDIRECT_TO_L_VERSION_1

#define _REDIRECT_TO_L_VERSION_1 (   _ReturnType,
  _FunctionName,
  _Type1 
)
Value:
_REDIRECT_TO_L_VERSION_FUNC_PROLOGUE \
_ReturnType __cdecl _FunctionName(_Type1 _Arg1) \
{ \
return _FunctionName##_l(_Arg1, NULL); \
}
#define __cdecl
Definition: accygwin.h:79
#define NULL
Definition: types.h:112
_In_opt_z_ wchar_t const * _FunctionName
Definition: corecrt.h:388

Definition at line 1771 of file corecrt_internal.h.

◆ _REDIRECT_TO_L_VERSION_2

#define _REDIRECT_TO_L_VERSION_2 (   _ReturnType,
  _FunctionName,
  _Type1,
  _Type2 
)
Value:
_REDIRECT_TO_L_VERSION_FUNC_PROLOGUE \
_ReturnType __cdecl _FunctionName(_Type1 _Arg1, _Type2 _Arg2) \
{ \
return _FunctionName##_l(_Arg1, _Arg2, NULL); \
}

Definition at line 1778 of file corecrt_internal.h.

◆ _REDIRECT_TO_L_VERSION_3

#define _REDIRECT_TO_L_VERSION_3 (   _ReturnType,
  _FunctionName,
  _Type1,
  _Type2,
  _Type3 
)
Value:
_REDIRECT_TO_L_VERSION_FUNC_PROLOGUE \
_ReturnType __cdecl _FunctionName(_Type1 _Arg1, _Type2 _Arg2, _Type3 _Arg3) \
{ \
return _FunctionName##_l(_Arg1, _Arg2, _Arg3, NULL); \
}

Definition at line 1785 of file corecrt_internal.h.

◆ _REDIRECT_TO_L_VERSION_4

#define _REDIRECT_TO_L_VERSION_4 (   _ReturnType,
  _FunctionName,
  _Type1,
  _Type2,
  _Type3,
  _Type4 
)
Value:
_REDIRECT_TO_L_VERSION_FUNC_PROLOGUE \
_ReturnType __cdecl _FunctionName(_Type1 _Arg1, _Type2 _Arg2, _Type3 _Arg3, _Type4 _Arg4) \
{ \
return _FunctionName##_l(_Arg1, _Arg2, _Arg3, _Arg4, NULL); \
}

Definition at line 1792 of file corecrt_internal.h.

◆ _REDIRECT_TO_L_VERSION_FUNC_PROLOGUE

#define _REDIRECT_TO_L_VERSION_FUNC_PROLOGUE

Definition at line 1768 of file corecrt_internal.h.

◆ _SECURECRT__FILL_BYTE

#define _SECURECRT__FILL_BYTE (   _Position)

Definition at line 1707 of file corecrt_internal.h.

◆ _SECURECRT__FILL_STRING

#define _SECURECRT__FILL_STRING (   _String,
  _Count,
  _Offset 
)

Definition at line 1697 of file corecrt_internal.h.

◆ _SECURECRT_FILL_BUFFER

#define _SECURECRT_FILL_BUFFER   0

Definition at line 1667 of file corecrt_internal.h.

◆ _SECURECRT_FILL_BUFFER_THRESHOLD

#define _SECURECRT_FILL_BUFFER_THRESHOLD   ((size_t)0)

Definition at line 1675 of file corecrt_internal.h.

◆ _strdup_crt

#define _strdup_crt   _strdup

Definition at line 1013 of file corecrt_internal.h.

◆ _UCRT_HEAP_MISMATCH_ANY

◆ _UCRT_HEAP_MISMATCH_BREAK

#define _UCRT_HEAP_MISMATCH_BREAK   0

Definition at line 1000 of file corecrt_internal.h.

◆ _UCRT_HEAP_MISMATCH_DETECTION

#define _UCRT_HEAP_MISMATCH_DETECTION   0

Definition at line 998 of file corecrt_internal.h.

◆ _UCRT_HEAP_MISMATCH_RECOVERY

#define _UCRT_HEAP_MISMATCH_RECOVERY   0

Definition at line 999 of file corecrt_internal.h.

◆ _VALIDATE_STREAM_ANSI_RETURN

#define _VALIDATE_STREAM_ANSI_RETURN (   stream,
  errorcode,
  retexpr 
)
Value:
{ \
int fn; \
_VALIDATE_RETURN(( \
(_Stream.is_string_backed()) || \
(fn = _fileno(_Stream.public_stream()), \
errorcode, retexpr) \
}
_Inout_ FILE * _Stream
_Check_return_ _CRTIMP int __cdecl _fileno(_In_ FILE *_File)
#define _textmode_safe(i)
Definition: internal.h:81
#define _tm_unicode_safe(i)
Definition: internal.h:82
Definition: parse.h:23
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159

Definition at line 1718 of file corecrt_internal.h.

◆ _wdupenv_s_crt

#define _wdupenv_s_crt   _wdupenv_s

Definition at line 1016 of file corecrt_internal.h.

◆ _WSETLOCALE_AVOID_SYNC_LOCALE_BIT

#define _WSETLOCALE_AVOID_SYNC_LOCALE_BIT   0x10

Definition at line 408 of file corecrt_internal.h.

◆ CATNAMES_LEN

#define CATNAMES_LEN   57

Definition at line 402 of file corecrt_internal.h.

◆ DBGRPT_INVALIDMSG

#define DBGRPT_INVALIDMSG   "_CrtDbgReport: String too long or Invalid characters in String"

Definition at line 284 of file corecrt_internal.h.

◆ DBGRPT_MAX_MSG

#define DBGRPT_MAX_MSG   4096

Definition at line 282 of file corecrt_internal.h.

◆ DBGRPT_TOOLONGMSG

#define DBGRPT_TOOLONGMSG   "_CrtDbgReport: String too long or IO Error"

Definition at line 283 of file corecrt_internal.h.

◆ LC_INT_TYPE

#define LC_INT_TYPE   0

Definition at line 404 of file corecrt_internal.h.

◆ LC_STR_TYPE

#define LC_STR_TYPE   1

Definition at line 405 of file corecrt_internal.h.

◆ LC_WSTR_TYPE

#define LC_WSTR_TYPE   2

Definition at line 406 of file corecrt_internal.h.

◆ MAX_CP_LEN

#define MAX_CP_LEN   16

Definition at line 401 of file corecrt_internal.h.

◆ MAX_CTRY_LEN

#define MAX_CTRY_LEN   64

Definition at line 398 of file corecrt_internal.h.

◆ MAX_LANG_LEN

#define MAX_LANG_LEN   64

Definition at line 397 of file corecrt_internal.h.

◆ MAX_LC_LEN

#define MAX_LC_LEN   (MAX_LANG_LEN + MAX_CTRY_LEN + 3)

Definition at line 399 of file corecrt_internal.h.

Typedef Documentation

◆ __acrt_initializer

◆ __acrt_lock_id

◆ __acrt_ptd

◆ __acrt_thread_parameter

◆ __acrt_uninitialize_pft

typedef bool(__cdecl * __acrt_uninitialize_pft) (bool)

Definition at line 315 of file corecrt_internal.h.

◆ __crt_ctype_compatibility_data

◆ __crt_lc_time_data

◆ __crt_locale_data

◆ __crt_locale_refcount

◆ __crt_locale_string_table

◆ __crt_locale_strings

◆ __crt_multibyte_data

◆ __crt_qualified_locale_data

◆ __crt_qualified_locale_data_downlevel

◆ __crt_signal_handler_t

typedef void(__cdecl * __crt_signal_handler_t) (int)

Definition at line 1394 of file corecrt_internal.h.

Enumeration Type Documentation

◆ __acrt_lock_id

Enumerator
__acrt_heap_lock 
__acrt_debug_lock 
__acrt_exit_lock 
__acrt_signal_lock 
__acrt_locale_lock 
__acrt_multibyte_cp_lock 
__acrt_time_lock 
__acrt_lowio_index_lock 
__acrt_stdio_index_lock 
__acrt_conio_lock 
__acrt_popen_lock 
__acrt_environment_lock 
__acrt_tempnam_lock 
__acrt_os_exit_lock 
__acrt_lock_count 

Definition at line 936 of file corecrt_internal.h.

937{
__acrt_lock_id
@ __acrt_signal_lock
@ __acrt_tempnam_lock
@ __acrt_heap_lock
@ __acrt_lock_count
@ __acrt_os_exit_lock
@ __acrt_exit_lock
@ __acrt_popen_lock
@ __acrt_conio_lock
@ __acrt_lowio_index_lock
@ __acrt_stdio_index_lock
@ __acrt_debug_lock
@ __acrt_time_lock
@ __acrt_environment_lock
@ __acrt_locale_lock
@ __acrt_multibyte_cp_lock

◆ begin_thread_init_policy

Enumerator
begin_thread_init_policy_unknown 
begin_thread_init_policy_none 
begin_thread_init_policy_ro_initialize 

Definition at line 2085 of file corecrt_internal.h.

◆ developer_information_policy

Enumerator
developer_information_policy_unknown 
developer_information_policy_none 
developer_information_policy_ui 

Definition at line 2095 of file corecrt_internal.h.

◆ process_end_policy

Enumerator
process_end_policy_terminate_process 
process_end_policy_exit_process 

Definition at line 2076 of file corecrt_internal.h.

◆ windowing_model_policy

Enumerator
windowing_model_policy_unknown 
windowing_model_policy_hwnd 
windowing_model_policy_corewindow 
windowing_model_policy_legacyphone 
windowing_model_policy_none 

Definition at line 2105 of file corecrt_internal.h.

Function Documentation

◆ __acrt_add_locale_ref()

void __cdecl __acrt_add_locale_ref ( __crt_locale_data ptloci)

Definition at line 22 of file locale_refcounting.cpp.

23{
25
26 if (ptloci->lconv_intl_refcount != nullptr)
27 {
29 }
30
31 if (ptloci->lconv_mon_refcount != nullptr)
32 {
34 }
35
36 if (ptloci->lconv_num_refcount != nullptr)
37 {
39 }
40
41 if (ptloci->ctype1_refcount != nullptr)
42 {
44 }
45
46 for (int category = LC_MIN; category <= LC_MAX; ++category)
47 {
49 ptloci->lc_category[category].wrefcount != nullptr)
50 {
52 }
53
54 if (ptloci->lc_category[category].locale != nullptr &&
55 ptloci->lc_category[category].refcount != nullptr)
56 {
58 }
59 }
60
62}
wchar_t __acrt_wide_c_locale_string[]
Definition: nlsdata.cpp:28
#define LC_MAX
Definition: locale.h:25
#define LC_MIN
Definition: locale.h:24
long __cdecl _InterlockedIncrement(_Interlocked_operand_ long volatile *_Addend)
long __cdecl __acrt_locale_add_lc_time_reference(__crt_lc_time_data const *const lc_time)
__crt_locale_refcount lc_category[6]
__crt_lc_time_data const * lc_time_curr

Referenced by _copytlocinfo_nolock(), _get_current_locale(), _updatetlocinfoEx_nolock(), and replace_current_thread_locale_nolock().

◆ __acrt_app_verifier_enabled()

bool __cdecl __acrt_app_verifier_enabled ( void  )

Definition at line 14 of file peb_access.cpp.

15{
16 return (NtCurrentTeb()->ProcessEnvironmentBlock->NtGlobalFlag & FLG_APPLICATION_VERIFIER) != 0;
17}
#define FLG_APPLICATION_VERIFIER
Definition: pstypes.h:64
#define NtCurrentTeb

Referenced by should_call_terminate_process().

◆ __acrt_AppPolicyGetProcessTerminationMethodInternal()

LONG WINAPI __acrt_AppPolicyGetProcessTerminationMethodInternal ( _Out_ AppPolicyProcessTerminationMethod policy)

Definition at line 808 of file winapi_thunks.cpp.

809{
810 if (auto const app_policy_get_process_terminaton_method_claims = try_get_AppPolicyGetProcessTerminationMethod())
811 {
812 return app_policy_get_process_terminaton_method_claims(GetCurrentThreadEffectiveToken(), policy);
813 }
814
815 return STATUS_NOT_FOUND;
816}
WINBASEAPI _Check_return_ _Out_ AppPolicyProcessTerminationMethod * policy
Definition: appmodel.h:47
#define GetCurrentThreadEffectiveToken()
Definition: security.c:42
#define STATUS_NOT_FOUND
Definition: shellext.h:72

Referenced by __acrt_get_process_end_policy().

◆ __acrt_AppPolicyGetShowDeveloperDiagnosticInternal()

LONG WINAPI __acrt_AppPolicyGetShowDeveloperDiagnosticInternal ( _Out_ AppPolicyShowDeveloperDiagnostic policy)

Definition at line 828 of file winapi_thunks.cpp.

829{
830 if (auto const app_policy_get_show_developer_diagnostic_claims = try_get_AppPolicyGetShowDeveloperDiagnostic())
831 {
832 return app_policy_get_show_developer_diagnostic_claims(GetCurrentThreadEffectiveToken(), policy);
833 }
834
835 return STATUS_NOT_FOUND;
836}

Referenced by __acrt_get_developer_information_policy().

◆ __acrt_AppPolicyGetThreadInitializationTypeInternal()

LONG WINAPI __acrt_AppPolicyGetThreadInitializationTypeInternal ( _Out_ AppPolicyThreadInitializationType policy)

Definition at line 818 of file winapi_thunks.cpp.

819{
820 if (auto const app_policy_get_thread_initialization_type_claims = try_get_AppPolicyGetThreadInitializationType())
821 {
822 return app_policy_get_thread_initialization_type_claims(GetCurrentThreadEffectiveToken(), policy);
823 }
824
825 return STATUS_NOT_FOUND;
826}

Referenced by __acrt_get_begin_thread_init_policy().

◆ __acrt_AppPolicyGetWindowingModelInternal()

LONG WINAPI __acrt_AppPolicyGetWindowingModelInternal ( _Out_ AppPolicyWindowingModel policy)

Definition at line 838 of file winapi_thunks.cpp.

839{
840 if (auto const app_policy_get_windowing_model_claims = try_get_AppPolicyGetWindowingModel())
841 {
842 return app_policy_get_windowing_model_claims(GetCurrentThreadEffectiveToken(), policy);
843 }
844
845 return STATUS_NOT_FOUND;
846}

Referenced by __acrt_get_windowing_model_policy().

◆ __acrt_AreFileApisANSI()

BOOL WINAPI __acrt_AreFileApisANSI ( void  )

Definition at line 405 of file winapi_thunks.cpp.

406{
407 if (auto const are_file_apis_ansi = try_get_AreFileApisANSI())
408 {
409 return are_file_apis_ansi();
410 }
411
412 // If we were unable to get the AreFileApisANSI function, we can safely
413 // assume that the file APIs are, in fact, ANSI:
414 return TRUE;
415}
#define TRUE
Definition: types.h:120

Referenced by __acrt_get_utf8_acp_compatibility_codepage(), and __acrt_GetTempPath2A().

◆ __acrt_call_reportfault()

void __cdecl __acrt_call_reportfault ( int  nDbgHookCode,
DWORD  dwExceptionCode,
DWORD  dwExceptionFlags 
)

Referenced by abort().

◆ __acrt_can_show_message_box()

bool __cdecl __acrt_can_show_message_box ( void  )

Definition at line 858 of file winapi_thunks.cpp.

859{
860 bool can_show_message_box = false;
862 && try_get_MessageBoxA() != nullptr
863 && try_get_MessageBoxW() != nullptr)
864 {
865 can_show_message_box = true;
866 }
867 return can_show_message_box;
868}
windowing_model_policy __cdecl __acrt_get_windowing_model_policy(void)

Referenced by common_show_message_box().

◆ __acrt_can_use_vista_locale_apis()

bool __cdecl __acrt_can_use_vista_locale_apis ( void  )

Definition at line 870 of file winapi_thunks.cpp.

871{
872 return try_get_CompareStringEx() != nullptr;
873}

Referenced by _expandlocale().

◆ __acrt_can_use_xstate_apis()

bool __cdecl __acrt_can_use_xstate_apis ( void  )

Definition at line 894 of file winapi_thunks.cpp.

895{
896 return try_get_LocateXStateFeature() != nullptr;
897}

◆ __acrt_CompareStringA()

int __cdecl __acrt_CompareStringA ( _In_opt_ _locale_t  _Plocinfo,
_In_ LPCWSTR  _LocaleName,
_In_ DWORD  _DwCmpFlags,
_In_CRT_NLS_string_(_CchCount1) PCCH  _LpString1,
_In_ int  _CchCount1,
_In_CRT_NLS_string_(_CchCount2) PCCH  _LpString2,
_In_ int  _CchCount2,
_In_ int  _CodePage 
)

◆ __acrt_CompareStringEx()

int WINAPI __acrt_CompareStringEx ( _In_opt_ LPCWSTR  locale_name,
_In_ DWORD  flags,
_In_NLS_string_(string1_count) LPCWCH  string1,
_In_ int  string1_count,
_In_NLS_string_(string2_count) LPCWCH  string2,
_In_ int  string2_count,
_Reserved_ LPNLSVERSIONINFO  version,
_Reserved_ LPVOID  reserved,
_Reserved_ LPARAM  param 
)

◆ __acrt_CompareStringW()

int __cdecl __acrt_CompareStringW ( _In_ LPCWSTR  _LocaleName,
_In_ DWORD  _DwCmpFlags,
_In_CRT_NLS_string_(_CchCount1) PCWCH  _LpString1,
_In_ int  _CchCount1,
_In_CRT_NLS_string_(_CchCount2) PCWCH  _LpString2,
_In_ int  _CchCount2 
)

◆ __acrt_CreateProcessA()

BOOL __cdecl __acrt_CreateProcessA ( _In_opt_ LPCSTR  lpApplicationName,
_Inout_opt_ LPSTR  lpCommandLine,
_In_opt_ LPSECURITY_ATTRIBUTES  lpProcessAttributes,
_In_opt_ LPSECURITY_ATTRIBUTES  lpThreadAttributes,
_In_ BOOL  bInheritHandles,
_In_ DWORD  dwCreationFlags,
_In_opt_ LPVOID  lpEnvironment,
_In_opt_ LPCSTR  lpCurrentDirectory,
_In_ LPSTARTUPINFOW  lpStartupInfo,
_Out_ LPPROCESS_INFORMATION  lpProcessInformation 
)

◆ __acrt_DownlevelLocaleNameToLCID()

LCID __cdecl __acrt_DownlevelLocaleNameToLCID ( _In_opt_ LPCWSTR  localeName)

Referenced by __acrt_LocaleNameToLCID().

◆ __acrt_eagerly_load_locale_apis()

void __cdecl __acrt_eagerly_load_locale_apis ( void  )

Definition at line 879 of file winapi_thunks.cpp.

880{
881 try_get_AreFileApisANSI();
882 try_get_CompareStringEx();
883 try_get_EnumSystemLocalesEx();
884 try_get_GetDateFormatEx();
885 try_get_GetLocaleInfoEx();
886 try_get_GetTimeFormatEx();
887 try_get_GetUserDefaultLocaleName();
888 try_get_IsValidLocaleName();
889 try_get_LCMapStringEx();
890 try_get_LCIDToLocaleName();
891 try_get_LocaleNameToLCID();
892}

Referenced by _lock_locales(), _wsetlocale(), and setlocale().

◆ __acrt_EnumSystemLocalesEx()

BOOL WINAPI __acrt_EnumSystemLocalesEx ( _In_ LOCALE_ENUMPROCEX  enum_proc,
_In_ DWORD  flags,
_In_ LPARAM  param,
_In_opt_ LPVOID  reserved 
)

◆ __acrt_errno_from_os_error()

int __cdecl __acrt_errno_from_os_error ( unsigned long  oserrno)

Definition at line 103 of file errno.cpp.

104{
105 // Check the table for the OS error code
106 for (unsigned i{0}; i < ERRTABLECOUNT; ++i)
107 {
108 if (oserrno == errtable[i].oscode)
109 return errtable[i].errnocode;
110 }
111
112 // The error code wasn't in the table. We check for a range of
113 // EACCES errors or exec failure errors (ENOEXEC). Otherwise
114 // EINVAL is returned.
115 if (oserrno >= MIN_EACCES_RANGE && oserrno <= MAX_EACCES_RANGE)
116 {
117 return EACCES;
118 }
119 else if (oserrno >= MIN_EXEC_ERROR && oserrno <= MAX_EXEC_ERROR)
120 {
121 return ENOEXEC;
122 }
123 else
124 {
125 return EINVAL;
126 }
127}
#define EINVAL
Definition: acclib.h:90
#define EACCES
Definition: acclib.h:85
#define ENOEXEC
Definition: errno.h:14
#define ERRTABLECOUNT
Definition: errno.cpp:76
#define MAX_EXEC_ERROR
Definition: errno.cpp:81
#define MIN_EACCES_RANGE
Definition: errno.cpp:85
static errentry const errtable[]
Definition: errno.cpp:27
#define MIN_EXEC_ERROR
Definition: errno.cpp:80
#define MAX_EACCES_RANGE
Definition: errno.cpp:86
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248

Referenced by __acrt_errno_map_os_error(), __acrt_errno_map_os_error_ptd(), and _getdiskfree().

◆ __acrt_errno_map_os_error()

◆ __acrt_execute_initializers()

bool __cdecl __acrt_execute_initializers ( _In_reads_(last - first) _In_ __acrt_initializer const first,
_In_reads_(0) __acrt_initializer const last 
)

Referenced by __acrt_initialize().

◆ __acrt_execute_uninitializers()

bool __cdecl __acrt_execute_uninitializers ( _In_reads_(last - first) __acrt_initializer const first,
_In_reads_(0) __acrt_initializer const last 
)

Referenced by __acrt_uninitialize().

◆ __acrt_FlsAlloc()

DWORD WINAPI __acrt_FlsAlloc ( _In_opt_ PFLS_CALLBACK_FUNCTION  lpCallback)

Referenced by __acrt_initialize_ptd().

◆ __acrt_FlsFree()

BOOL WINAPI __acrt_FlsFree ( _In_ DWORD  dwFlsIndex)

Referenced by __acrt_uninitialize_ptd().

◆ __acrt_FlsGetValue()

PVOID WINAPI __acrt_FlsGetValue ( _In_ DWORD  dwFlsIndex)

Referenced by try_get_ptd_head().

◆ __acrt_FlsSetValue()

BOOL WINAPI __acrt_FlsSetValue ( _In_ DWORD  dwFlsIndex,
_In_opt_ PVOID  lpFlsData 
)

Referenced by __acrt_freeptd(), and _Success_().

◆ __acrt_free_locale()

void __cdecl __acrt_free_locale ( __crt_locale_data ptloci)

Definition at line 125 of file locale_refcounting.cpp.

126{
127 /*
128 * Free up lconv struct
129 */
130 if (ptloci->lconv != nullptr &&
131 ptloci->lconv != &__acrt_lconv_c &&
132 ptloci->lconv_intl_refcount != nullptr &&
133 *ptloci->lconv_intl_refcount == 0)
134 {
135 if (ptloci->lconv_mon_refcount != nullptr && *ptloci->lconv_mon_refcount == 0)
136 {
139 }
140
141 if (ptloci->lconv_num_refcount != nullptr && *ptloci->lconv_num_refcount == 0)
142 {
145 }
146
148 _free_crt(ptloci->lconv);
149 }
150
151 /*
152 * Free up ctype tables
153 */
154 if (ptloci->ctype1_refcount != nullptr && *ptloci->ctype1_refcount == 0)
155 {
156 _free_crt(ptloci->ctype1 - _COFFSET);
157 _free_crt(const_cast<unsigned char*>(ptloci->pclmap - _COFFSET - 1));
158 _free_crt(const_cast<unsigned char*>(ptloci->pcumap - _COFFSET - 1));
159 _free_crt(ptloci->ctype1_refcount);
160 }
161
163
164 for (int category = LC_MIN; category <= LC_MAX; ++category)
165 {
167 ptloci->lc_category[category].wrefcount != nullptr &&
168 *ptloci->lc_category[category].wrefcount == 0)
169 {
172 }
173
174 _ASSERTE((ptloci->lc_category[category].locale != nullptr && ptloci->lc_category[category].refcount != nullptr) ||
175 (ptloci->lc_category[category].locale == nullptr && ptloci->lc_category[category].refcount == nullptr));
176
177 if (ptloci->lc_category[category].locale != nullptr &&
178 ptloci->lc_category[category].refcount != nullptr &&
179 *ptloci->lc_category[category].refcount == 0)
180 {
182 }
183 }
184
185 /*
186 * Free up the __crt_locale_data struct
187 */
188 _free_crt(ptloci);
189}
void __cdecl __acrt_locale_free_numeric(_Inout_ struct lconv *lconv)
#define _COFFSET
void __cdecl __acrt_locale_free_monetary(_Inout_ struct lconv *lconv)
#define _ASSERTE(expr)
Definition: crtdbg.h:114
#define _free_crt
void __cdecl __acrt_locale_free_lc_time_if_unreferenced(__crt_lc_time_data const *const lc_time)
unsigned char const * pcumap
wchar_t * locale_name[6]
unsigned char const * pclmap
unsigned short * ctype1
struct lconv * lconv

Referenced by replace_current_thread_locale_nolock().

◆ __acrt_freeptd()

void __cdecl __acrt_freeptd ( void  )

Definition at line 322 of file per_thread_data.cpp.

323{
324 __acrt_ptd* const ptd_head = try_get_ptd_head();
325 if (!ptd_head)
326 {
327 return;
328 }
329
331 destroy_fls(ptd_head);
332}
BOOL WINAPI __acrt_FlsSetValue(_In_ DWORD dwFlsIndex, _In_opt_ PVOID lpFlsData)
static void WINAPI destroy_fls(void *)
static unsigned long __acrt_flsindex
static __forceinline __acrt_ptd * try_get_ptd_head()

Referenced by __acrt_thread_detach().

◆ __acrt_get_begin_thread_init_policy()

begin_thread_init_policy __cdecl __acrt_get_begin_thread_init_policy ( void  )

Definition at line 85 of file win_policies.cpp.

86{
87 struct begin_thread_init_policy_properties
88 {
89 typedef begin_thread_init_policy policy_type;
90 typedef AppPolicyThreadInitializationType appmodel_policy_type;
91
92 static_assert(begin_thread_init_policy_unknown == 0, "Default value for cache must be 0");
93
94 static policy_type appmodel_policy_to_policy_type(long const appmodelPolicy) throw()
95 {
97 {
99 }
100 else
101 {
103 }
104 }
105
106 static LONG appmodel_get_policy(appmodel_policy_type* appmodelPolicy)
107 {
109 }
110 };
111
112 return get_cached_win_policy<begin_thread_init_policy_properties>(AppPolicyThreadInitializationType_None);
113}
AppPolicyThreadInitializationType
Definition: appmodel.h:21
@ AppPolicyThreadInitializationType_None
Definition: appmodel.h:22
@ AppPolicyThreadInitializationType_InitializeWinRT
Definition: appmodel.h:23
LONG WINAPI __acrt_AppPolicyGetThreadInitializationTypeInternal(_Out_ AppPolicyThreadInitializationType *policy)
long LONG
Definition: pedump.c:60

Referenced by thread_start().

◆ __acrt_get_developer_information_policy()

developer_information_policy __cdecl __acrt_get_developer_information_policy ( void  )

Definition at line 116 of file win_policies.cpp.

117{
118 struct developer_information_policy_properties
119 {
120 typedef developer_information_policy policy_type;
121 typedef AppPolicyShowDeveloperDiagnostic appmodel_policy_type;
122
123 static_assert(developer_information_policy_unknown == 0, "Default value for cache must be 0");
124
125 static policy_type appmodel_policy_to_policy_type(long const appmodelPolicy) throw()
126 {
127 if (appmodelPolicy == AppPolicyShowDeveloperDiagnostic_ShowUI)
128 {
130 }
131 else
132 {
134 }
135 }
136
137 static LONG appmodel_get_policy(appmodel_policy_type* appmodelPolicy)
138 {
140 }
141 };
142
143 return get_cached_win_policy<developer_information_policy_properties>(AppPolicyShowDeveloperDiagnostic_ShowUI);
144}
AppPolicyShowDeveloperDiagnostic
Definition: appmodel.h:27
@ AppPolicyShowDeveloperDiagnostic_ShowUI
Definition: appmodel.h:29
LONG WINAPI __acrt_AppPolicyGetShowDeveloperDiagnosticInternal(_Out_ AppPolicyShowDeveloperDiagnostic *policy)

Referenced by common_show_message_box().

◆ __acrt_get_parent_window()

HWND __cdecl __acrt_get_parent_window ( void  )

Definition at line 899 of file winapi_thunks.cpp.

900{
901 auto const get_active_window = try_get_GetActiveWindow();
902 if (!get_active_window)
903 {
904 return nullptr;
905 }
906
907 HWND const active_window = get_active_window();
908 if (!active_window)
909 {
910 return nullptr;
911 }
912
913 auto const get_last_active_popup = try_get_GetLastActivePopup();
914 if (!get_last_active_popup)
915 {
916 return active_window;
917 }
918
919 return get_last_active_popup(active_window);
920}

Referenced by common_show_message_box().

◆ __acrt_get_process_end_policy()

process_end_policy __cdecl __acrt_get_process_end_policy ( void  )

Definition at line 56 of file win_policies.cpp.

57{
58 struct process_end_policy_properties
59 {
60 typedef process_end_policy policy_type;
61 typedef AppPolicyProcessTerminationMethod appmodel_policy_type;
62
63 static policy_type appmodel_policy_to_policy_type(appmodel_policy_type const appmodelPolicy) throw()
64 {
66 {
68 }
69 else
70 {
72 }
73 }
74
75 static LONG appmodel_get_policy(appmodel_policy_type* appmodelPolicy)
76 {
78 }
79 };
80
81 return get_win_policy<process_end_policy_properties>(AppPolicyProcessTerminationMethod_ExitProcess);
82}
AppPolicyProcessTerminationMethod
Definition: appmodel.h:15
@ AppPolicyProcessTerminationMethod_TerminateProcess
Definition: appmodel.h:17
@ AppPolicyProcessTerminationMethod_ExitProcess
Definition: appmodel.h:16
LONG WINAPI __acrt_AppPolicyGetProcessTerminationMethodInternal(_Out_ AppPolicyProcessTerminationMethod *policy)

Referenced by should_call_terminate_process().

◆ __acrt_get_sigabrt_handler()

__crt_signal_handler_t __cdecl __acrt_get_sigabrt_handler ( void  )

Definition at line 564 of file signal.cpp.

565{
566 return __acrt_lock_and_call(__acrt_signal_lock, []
567 {
568 return __crt_fast_decode_pointer(abort_action.value());
569 });
570}
static __crt_state_management::dual_state_global< __crt_signal_handler_t > abort_action
Definition: signal.cpp:26

Referenced by abort(), and common_message_window().

◆ __acrt_get_windowing_model_policy()

windowing_model_policy __cdecl __acrt_get_windowing_model_policy ( void  )

Definition at line 147 of file win_policies.cpp.

148{
149 struct windowing_model_policy_properties
150 {
151 typedef windowing_model_policy policy_type;
152 typedef AppPolicyWindowingModel appmodel_policy_type;
153
154 static_assert(windowing_model_policy_unknown == 0, "Default value for cache must be 0");
155
156 static policy_type appmodel_policy_to_policy_type(long const appmodelPolicy) throw()
157 {
158 switch (appmodelPolicy)
159 {
162
165
168
170 default:
172 }
173 }
174
175 static LONG appmodel_get_policy(appmodel_policy_type* appmodelPolicy)
176 {
177 return __acrt_AppPolicyGetWindowingModelInternal(appmodelPolicy);
178 }
179 };
180
181 return get_cached_win_policy<windowing_model_policy_properties>(AppPolicyWindowingModel_ClassicDesktop);
182}
AppPolicyWindowingModel
Definition: appmodel.h:33
@ AppPolicyWindowingModel_ClassicDesktop
Definition: appmodel.h:36
@ AppPolicyWindowingModel_Universal
Definition: appmodel.h:35
@ AppPolicyWindowingModel_None
Definition: appmodel.h:34
@ AppPolicyWindowingModel_ClassicPhone
Definition: appmodel.h:37
LONG WINAPI __acrt_AppPolicyGetWindowingModelInternal(_Out_ AppPolicyWindowingModel *policy)

Referenced by __acrt_can_show_message_box(), and common_show_message_box().

◆ __acrt_GetDateFormatEx()

int WINAPI __acrt_GetDateFormatEx ( _In_opt_ LPCWSTR  locale_name,
_In_ DWORD  flags,
_In_opt_ SYSTEMTIME CONST date,
_In_opt_ LPCWSTR  format,
_Out_writes_opt_(buffer_count) LPWSTR  buffer,
_In_opt_ int  buffer_count,
_In_opt_ LPCWSTR  calendar 
)

Referenced by throw().

◆ __acrt_GetEnabledXStateFeatures()

DWORD64 WINAPI __acrt_GetEnabledXStateFeatures ( void  )

Definition at line 581 of file winapi_thunks.cpp.

582{
583 if (auto const get_enabled_xstate_features = try_get_GetEnabledXStateFeatures())
584 {
585 return get_enabled_xstate_features();
586 }
587
588 abort(); // No fallback; callers should check availablility before calling
589}
#define abort()
Definition: i386-dis.c:34

◆ __acrt_GetLocaleInfoA()

int __cdecl __acrt_GetLocaleInfoA ( _In_opt_ _locale_t  _Locale,
_In_ int  _LCType,
_In_ LPCWSTR  _LocaleName,
_In_ LCTYPE  _FieldType,
_Out_ void _Address 
)

◆ __acrt_GetLocaleInfoEx()

◆ __acrt_GetModuleFileNameA()

DWORD __cdecl __acrt_GetModuleFileNameA ( _In_opt_ HMODULE  hModule,
_When_(return< nSize, _Out_writes_to_(nSize, return+1)) _When_(return==nSize, _Out_writes_all_(nSize) _Null_terminated_) char lpFilename,
_In_range_(1, MAX_PATH) DWORD  nSize 
)

◆ __acrt_getptd()

◆ __acrt_getptd_head()

__acrt_ptd *__cdecl __acrt_getptd_head ( void  )

Definition at line 309 of file per_thread_data.cpp.

310{
311 __acrt_ptd* const ptd_head = internal_get_ptd_head();
312 if (!ptd_head)
313 {
314 abort();
315 }
316
317 return ptd_head;
318}

Referenced by __acrt_initialize_multibyte().

◆ __acrt_getptd_noexit()

◆ __acrt_GetSystemTimePreciseAsFileTime()

VOID WINAPI __acrt_GetSystemTimePreciseAsFileTime ( _Out_ LPFILETIME  system_time)

Referenced by common_ftime_s().

◆ __acrt_GetTempPath2W()

int WINAPI __acrt_GetTempPath2W ( _In_ DWORD  nBufferLength,
_Out_writes_to_opt_(BufferLength, return+1) LPWSTR  lpBuffer 
)

Referenced by __acrt_GetTempPath2A().

◆ __acrt_GetTimeFormatEx()

int WINAPI __acrt_GetTimeFormatEx ( _In_opt_ LPCWSTR  locale_name,
_In_ DWORD  flags,
_In_opt_ SYSTEMTIME CONST time,
_In_opt_ LPCWSTR  format,
_Out_writes_opt_(buffer_count) LPWSTR  buffer,
_In_opt_ int  buffer_count 
)

Referenced by throw().

◆ __acrt_GetUserDefaultLocaleName()

int WINAPI __acrt_GetUserDefaultLocaleName ( _Out_writes_(locale_name_count) LPWSTR  locale_name,
_In_ int  locale_name_count 
)

◆ __acrt_GetXStateFeaturesMask()

_Must_inspect_result_ BOOL WINAPI __acrt_GetXStateFeaturesMask ( _In_ PCONTEXT  context,
_Out_ PDWORD64  feature_mask 
)

◆ __acrt_has_user_matherr()

bool __cdecl __acrt_has_user_matherr ( void  )

Definition at line 32 of file matherr.cpp.

33{
35 __crt_fast_decode_pointer(__acrt_global_user_matherr.value());
36 return user_matherr != nullptr;
37}
static _UserMathErrorFunctionPointer user_matherr
int(__cdecl * _UserMathErrorFunctionPointer)(struct _exception *)
static __crt_state_management::dual_state_global< _UserMathErrorFunctionPointer > __acrt_global_user_matherr
Definition: matherr.cpp:15

◆ __acrt_initialize_command_line()

bool __cdecl __acrt_initialize_command_line ( void  )

Definition at line 61 of file argv_data.cpp.

62{
65 return true;
66}
char * _acmdln
Definition: argv_data.cpp:27
wchar_t * _wcmdln
Definition: argv_data.cpp:28
LPSTR WINAPI GetCommandLineA(VOID)
Definition: proc.c:2009
LPWSTR WINAPI GetCommandLineW(VOID)
Definition: proc.c:2019

◆ __acrt_initialize_heap()

bool __cdecl __acrt_initialize_heap ( void  )

Definition at line 21 of file heap_handle.cpp.

22{
24 if (__acrt_heap == nullptr)
25 return false;
26
27 return true;
28}
#define GetProcessHeap()
Definition: compat.h:736
HANDLE __acrt_heap
Definition: heap_handle.cpp:15

◆ __acrt_initialize_invalid_parameter_handler()

void __cdecl __acrt_initialize_invalid_parameter_handler ( _In_opt_ void encoded_null)

Referenced by initialize_pointers().

◆ __acrt_initialize_locks()

bool __cdecl __acrt_initialize_locks ( void  )

Definition at line 25 of file locks.cpp.

26{
27 for (unsigned i = 0; i < __acrt_lock_count; ++i)
28 {
30 {
32 return false;
33 }
34
36 }
37
38 return true;
39}
#define _CORECRT_SPINCOUNT
BOOL WINAPI __acrt_InitializeCriticalSectionEx(_Out_ LPCRITICAL_SECTION critical_section, _In_ DWORD spin_count, _In_ DWORD flags)
static unsigned __acrt_locks_initialized
Definition: locks.cpp:21
static CRITICAL_SECTION __acrt_lock_table[__acrt_lock_count]
Definition: locks.cpp:14
bool __cdecl __acrt_uninitialize_locks(bool const)
Definition: locks.cpp:41

◆ __acrt_initialize_lowio()

bool __cdecl __acrt_initialize_lowio ( void  )

Definition at line 224 of file ioinit.cpp.

225{
227 bool result = false;
228 __try
229 {
230 // First, allocate and initialize the initial array of lowio files:
232 __leave;
233
234 // Next, process and initialize all inherited file handles:
236
237 // Finally, initialize the stdio handles, if they were not inherited:
239 result = true;
240 }
242 {
244 }
246
247 return result;
248}
void __cdecl __acrt_unlock(_In_ __acrt_lock_id lock)
Definition: locks.cpp:57
_Check_return_opt_ errno_t __cdecl __acrt_lowio_ensure_fh_exists(_In_ int _FileHandle)
__acrt_lock(__acrt_heap_lock)
GLuint64EXT * result
Definition: glext.h:11304
static void initialize_stdio_handles_nolock()
Definition: ioinit.cpp:123
static void __cdecl initialize_inherited_file_handles_nolock()
Definition: ioinit.cpp:59
#define __try
Definition: pseh2_64.h:172
#define __leave
Definition: pseh2_64.h:176
#define __endtry
Definition: pseh2_64.h:175
#define __finally
Definition: pseh2_64.h:174

◆ __acrt_initialize_multibyte()

bool __cdecl __acrt_initialize_multibyte ( void  )

Definition at line 894 of file mbctype.cpp.

895{
896 static bool initialized = false;
897
898 // Synchronization note: it is not possible for a data race to occur here.
899 // In the CRT DLLs, this function is called during CRT startup, befor any
900 // user code using the CRT may run. In the static CRT, this function is
901 // called by a CRT initializer (at the top of this file), so 'initialized'
902 // will be true before any user code can enter the CRT.
903 //
904 // CRT_REFACTOR TODO We should split this function into two parts: one that
905 // does the initialization (without any check), and one that does nothing,
906 // but can be used to cause this object to be linked in.
907 if (!initialized)
908 {
909 // initialize global pointer to the current per-thread mbc information structure
911
912 // initialize mbc pointers
913 _mbcasemap.initialize_from_array(_mbcasemaps);
914 _mbctype .initialize_from_array(_mbctypes);
915
916 // initialize the multibyte globals
917 __acrt_ptd* const ptd_head = __acrt_getptd_head();
918 for (size_t i = 0; i != __crt_state_management::state_index_count; ++i)
919 {
920 setmbcp_internal(_MB_CP_ANSI, true, ptd_head + i, &__acrt_current_multibyte_data.dangerous_get_state_array()[i]);
921 }
922
923 initialized = 1;
924 }
925
926 return true;
927}
__acrt_ptd *__cdecl __acrt_getptd_head(void)
__crt_state_management::dual_state_global< unsigned char * > _mbcasemap
Definition: mbctype.cpp:128
static unsigned char _mbctypes[__crt_state_management::state_index_count][NUM_CHARS]
Definition: mbctype.cpp:93
__crt_state_management::dual_state_global< __crt_multibyte_data * > __acrt_current_multibyte_data
Definition: mbctype.cpp:131
__crt_state_management::dual_state_global< unsigned char * > _mbctype
Definition: mbctype.cpp:125
static unsigned char _mbcasemaps[__crt_state_management::state_index_count][256]
Definition: mbctype.cpp:116
__crt_multibyte_data __acrt_initial_multibyte_data
Definition: mbctype.cpp:42
static int __cdecl setmbcp_internal(int const requested_codepage, bool const is_for_crt_initialization, __acrt_ptd *const ptd, __crt_multibyte_data **const current_multibyte_data)
Definition: mbctype.cpp:394
#define _MB_CP_ANSI
Definition: msvcrt.h:830
static BOOL initialized
Definition: syslog.c:39

Referenced by do_locale_initialization(), initialize_multibyte(), and pre_initialize().

◆ __acrt_initialize_new_handler()

void __cdecl __acrt_initialize_new_handler ( _In_opt_ void encoded_null)

◆ __acrt_initialize_ptd()

bool __cdecl __acrt_initialize_ptd ( void  )

Definition at line 28 of file per_thread_data.cpp.

29{
32 {
33 return false;
34 }
35
36 if (__acrt_getptd_noexit() == nullptr)
37 {
39 return false;
40 }
41
42 return true;
43}
DWORD WINAPI __acrt_FlsAlloc(_In_opt_ PFLS_CALLBACK_FUNCTION lpCallback)
__acrt_ptd *__cdecl __acrt_getptd_noexit()
bool __cdecl __acrt_uninitialize_ptd(bool)
#define FLS_OUT_OF_INDEXES
Definition: winbase.h:602

◆ __acrt_initialize_signal_handlers()

void __cdecl __acrt_initialize_signal_handlers ( _In_opt_ void encoded_null)

Referenced by initialize_pointers().

◆ __acrt_initialize_thread_local_exit_callback()

void __cdecl __acrt_initialize_thread_local_exit_callback ( _In_opt_ void encoded_null)

Referenced by initialize_pointers().

◆ __acrt_initialize_user_matherr()

void __cdecl __acrt_initialize_user_matherr ( void encoded_null)

Definition at line 22 of file matherr.cpp.

23{
25 reinterpret_cast<_UserMathErrorFunctionPointer>(encoded_null));
26}

Referenced by initialize_pointers().

◆ __acrt_initialize_winapi_thunks()

bool __cdecl __acrt_initialize_winapi_thunks ( void  )

Definition at line 191 of file winapi_thunks.cpp.

192{
193 void* const encoded_nullptr = __crt_fast_encode_pointer(nullptr);
194
195 for (void*& p : encoded_function_pointers)
196 {
197 p = encoded_nullptr;
198 }
199
200 return true;
201}
GLfloat GLfloat p
Definition: glext.h:8902
static void * encoded_function_pointers[function_id_count]

◆ __acrt_InitializeCriticalSectionEx()

BOOL WINAPI __acrt_InitializeCriticalSectionEx ( _Out_ LPCRITICAL_SECTION  critical_section,
_In_ DWORD  spin_count,
_In_ DWORD  flags 
)

◆ __acrt_invoke_user_matherr()

int __cdecl __acrt_invoke_user_matherr ( struct _exception _Exp)

Definition at line 43 of file matherr.cpp.

44{
46 __crt_fast_decode_pointer(__acrt_global_user_matherr.value());
47 if (user_matherr != nullptr)
48 {
49 return user_matherr(_Exp);
50 }
51
52 return 0;
53}
_CRTIMP short __cdecl _Exp(double *, double, short)

Referenced by _invoke_matherr().

◆ __acrt_is_interactive()

bool __cdecl __acrt_is_interactive ( void  )

Definition at line 922 of file winapi_thunks.cpp.

923{
924 auto const get_process_window_station = try_get_GetProcessWindowStation();
925 if (!get_process_window_station)
926 {
927 return true;
928 }
929
930 auto const get_user_object_information = try_get_GetUserObjectInformationW();
931 if (!get_user_object_information)
932 {
933 return true;
934 }
935
936 HWINSTA const hwinsta = get_process_window_station();
937 if (!hwinsta)
938 {
939 return false;
940 }
941
942 USEROBJECTFLAGS uof{};
943 if (!get_user_object_information(hwinsta, UOI_FLAGS, &uof, sizeof(uof), nullptr))
944 {
945 return false;
946 }
947
948 if ((uof.dwFlags & WSF_VISIBLE) == 0)
949 {
950 return false;
951 }
952
953 return true;
954}
#define WSF_VISIBLE
Definition: winuser.h:2455
#define UOI_FLAGS
Definition: winuser.h:1086

Referenced by common_show_message_box().

◆ __acrt_is_secure_process()

bool __cdecl __acrt_is_secure_process ( void  )

Definition at line 19 of file peb_access.cpp.

20{
21 return (NtCurrentTeb()->ProcessEnvironmentBlock->ProcessParameters->Flags & RTL_USER_PROC_SECURE_PROCESS) != 0;
22}
#define RTL_USER_PROC_SECURE_PROCESS
Definition: ntrtl.h:15

Referenced by get_cached_win_policy(), and get_win_policy().

◆ __acrt_isleadbyte_l_noupdate()

__inline int __CRTDECL __acrt_isleadbyte_l_noupdate ( _In_ int const  c,
_In_ _locale_t const  locale 
)

Definition at line 808 of file corecrt_internal.h.

812{
813 return __acrt_locale_get_ctype_array_value(locale->locinfo->_public._locale_pctype, c, _LEADBYTE);
814}
Definition: _locale.h:75
static int __CRTDECL __acrt_locale_get_ctype_array_value(_In_reads_(_Char_value+1) unsigned short const *const locale_pctype_array, _In_range_(-1, 255) int const c, _In_ int const mask)
Definition: stubs.c:113
const GLubyte * c
Definition: glext.h:8905
#define _LEADBYTE
Definition: ctype.h:75

Referenced by __crt_stdio_output::output_processor< Character, OutputAdapter, ProcessorBase >::state_case_normal_tchar(), and __crt_stdio_output::output_processor< Character, OutputAdapter, ProcessorBase >::type_case_s_compute_narrow_string_length().

◆ __acrt_IsValidLocaleName()

BOOL WINAPI __acrt_IsValidLocaleName ( _In_ LPCWSTR  locale_name)

Referenced by _expandlocale().

◆ __acrt_LCIDToLocaleName()

int WINAPI __acrt_LCIDToLocaleName ( _In_ LCID  locale,
_Out_writes_opt_(name_count) LPWSTR  name,
_In_ int  name_count,
_In_ DWORD  flags 
)

◆ __acrt_LCMapStringEx()

int WINAPI __acrt_LCMapStringEx ( _In_opt_ LPCWSTR  locale_name,
_In_ DWORD  flags,
_In_CRT_NLS_string_(source_count) LPCWSTR  source,
_In_ int  source_count,
_Out_writes_opt_(destination_count) LPWSTR  destination,
_In_ int  destination_count,
_In_opt_ LPNLSVERSIONINFO  version,
_In_opt_ LPVOID  reserved,
_In_opt_ LPARAM  sort_handle 
)

Referenced by __acrt_LCMapStringW(), and if().

◆ __acrt_LoadLibraryExA()

HMODULE __cdecl __acrt_LoadLibraryExA ( _In_ LPCSTR  lpFileName,
_Reserved_ HANDLE  hFile,
_In_ DWORD  dwFlags 
)

Referenced by _loaddll().

◆ __acrt_locale_add_lc_time_reference()

long __cdecl __acrt_locale_add_lc_time_reference ( _In_opt_ __crt_lc_time_data const lc_time)

◆ __acrt_locale_free_lc_time_if_unreferenced()

void __cdecl __acrt_locale_free_lc_time_if_unreferenced ( _In_opt_ __crt_lc_time_data const lc_time)

◆ __acrt_locale_free_monetary()

void __cdecl __acrt_locale_free_monetary ( _Inout_ struct lconv lconv)

Referenced by __acrt_free_locale().

◆ __acrt_locale_free_numeric()

void __cdecl __acrt_locale_free_numeric ( _Inout_ struct lconv lconv)

Referenced by __acrt_free_locale().

◆ __acrt_locale_free_time()

void __cdecl __acrt_locale_free_time ( _Inout_opt_ __crt_lc_time_data lc_time_data)

◆ __acrt_locale_release_lc_time_reference()

long __cdecl __acrt_locale_release_lc_time_reference ( _In_opt_ __crt_lc_time_data const lc_time)

◆ __acrt_LocaleNameToLCID()

DWORD WINAPI __acrt_LocaleNameToLCID ( _In_ LPCWSTR  name,
_In_ DWORD  flags 
)

◆ __acrt_lock()

void __cdecl __acrt_lock ( _In_ __acrt_lock_id  lock)

Definition at line 52 of file locks.cpp.

53{
55}
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)

Referenced by _lock_locales().

◆ __acrt_MessageBoxA()

int WINAPI __acrt_MessageBoxA ( _In_opt_ HWND  hwnd,
_In_opt_ LPCSTR  text,
_In_opt_ LPCSTR  caption,
_In_ UINT  type 
)

◆ __acrt_MessageBoxW()

int WINAPI __acrt_MessageBoxW ( _In_opt_ HWND  hwnd,
_In_opt_ LPCWSTR  text,
_In_opt_ LPCWSTR  caption,
_In_ UINT  type 
)

◆ __acrt_OutputDebugStringA()

void WINAPI __acrt_OutputDebugStringA ( _In_opt_ LPCSTR  text)

Referenced by _VCrtDbgReportA().

◆ __acrt_pack_narrow_command_line_and_environment()

int __cdecl __acrt_pack_narrow_command_line_and_environment ( _In_z_ char const *const argv,
_In_opt_z_ char const *const envp,
_Outptr_result_maybenull_ char **  command_line_result,
_Outptr_result_maybenull_ char **  environment_block_result 
)

◆ __acrt_pack_wide_command_line_and_environment()

int __cdecl __acrt_pack_wide_command_line_and_environment ( _In_z_ wchar_t const *const argv,
_In_opt_z_ wchar_t const *const envp,
_Outptr_result_maybenull_ wchar_t **  command_line_result,
_Outptr_result_maybenull_ wchar_t **  environment_block_result 
)

◆ __acrt_release_locale_ref()

void __cdecl __acrt_release_locale_ref ( __crt_locale_data ptloci)

Definition at line 71 of file locale_refcounting.cpp.

72{
73 if (ptloci == nullptr)
74 return;
75
77
78 if (ptloci->lconv_intl_refcount != nullptr)
80
81 if (ptloci->lconv_mon_refcount != nullptr)
83
84 if (ptloci->lconv_num_refcount != nullptr)
86
87 if (ptloci->ctype1_refcount != nullptr)
89
90 for (int category = LC_MIN; category <= LC_MAX; ++category)
91 {
93 ptloci->lc_category[category].wrefcount != nullptr)
94 {
96 }
97
98 if (ptloci->lc_category[category].locale != nullptr &&
99 ptloci->lc_category[category].refcount != nullptr)
100 {
102 }
103 }
104
106}
long __cdecl _InterlockedDecrement(_Interlocked_operand_ long volatile *_Addend)
long __cdecl __acrt_locale_release_lc_time_reference(__crt_lc_time_data const *const lc_time)

Referenced by _free_locale(), _updatetlocinfoEx_nolock(), _wcreate_locale(), _wsetlocale(), and replace_current_thread_locale_nolock().

◆ __acrt_report_runtime_error()

void __cdecl __acrt_report_runtime_error ( _In_z_ wchar_t const message)

Referenced by abort().

◆ __acrt_RoUninitialize()

void WINAPI __acrt_RoUninitialize ( void  )

Definition at line 798 of file winapi_thunks.cpp.

799{
800 if (auto const ro_uninitialize = try_get_RoUninitialize())
801 {
802 return ro_uninitialize();
803 }
804
805 // No fallback (this is a best-effort wrapper)
806}

Referenced by common_end_thread().

◆ __acrt_set_locale_changed()

void __cdecl __acrt_set_locale_changed ( void  )

Definition at line 54 of file wsetlocale.cpp.

55{
57}
long __cdecl _InterlockedExchange(_Interlocked_operand_ long volatile *_Target, long _Value)
long __acrt_locale_changed_data
Definition: wsetlocale.cpp:31

Referenced by _wsetlocale(), and setmbcp_internal().

◆ __acrt_SetCurrentDirectoryA()

BOOL __cdecl __acrt_SetCurrentDirectoryA ( _In_ LPCSTR  lpPathName)

◆ __acrt_SetEnvironmentVariableA()

BOOL __cdecl __acrt_SetEnvironmentVariableA ( _In_ LPCSTR  lpName,
_In_opt_ LPCSTR  lpValue 
)

◆ __acrt_SetThreadStackGuarantee()

BOOL WINAPI __acrt_SetThreadStackGuarantee ( _Inout_ PULONG  stack_size_in_bytes)

Referenced by _resetstkoflw().

◆ __acrt_show_narrow_message_box()

int __cdecl __acrt_show_narrow_message_box ( _In_opt_z_ char const text,
_In_opt_z_ char const caption,
_In_ unsigned  type 
)

◆ __acrt_show_wide_message_box()

int __cdecl __acrt_show_wide_message_box ( _In_opt_z_ wchar_t const text,
_In_opt_z_ wchar_t const caption,
_In_ unsigned  type 
)

◆ __acrt_uninitialize_command_line()

bool __cdecl __acrt_uninitialize_command_line ( _In_ bool  terminating)

◆ __acrt_uninitialize_heap()

bool __cdecl __acrt_uninitialize_heap ( _In_ bool  terminating)

◆ __acrt_uninitialize_locks()

bool __cdecl __acrt_uninitialize_locks ( _In_ bool  terminating)

◆ __acrt_uninitialize_lowio()

bool __cdecl __acrt_uninitialize_lowio ( _In_ bool  terminating)

◆ __acrt_uninitialize_ptd()

bool __cdecl __acrt_uninitialize_ptd ( _In_ bool  terminating)

◆ __acrt_uninitialize_winapi_thunks()

bool __cdecl __acrt_uninitialize_winapi_thunks ( _In_ bool  terminating)

◆ __acrt_unlock()

◆ __acrt_update_thread_locale_data()

__crt_locale_data *__cdecl __acrt_update_thread_locale_data ( void  )

Definition at line 267 of file locale_refcounting.cpp.

268{
269 __crt_locale_data* ptloci = nullptr;
270 __acrt_ptd* const ptd = __acrt_getptd();
271
272 if (__acrt_should_sync_with_global_locale(ptd) || ptd->_locale_info == nullptr)
273 {
275 __try
276 {
277 ptloci = _updatetlocinfoEx_nolock(&ptd->_locale_info, __acrt_current_locale_data.value());
278 }
280 {
282 }
284 }
285 else
286 {
287 ptloci = ptd->_locale_info;
288 }
289
290 if (!ptloci)
291 {
292 abort();
293 }
294
295 return ptloci;
296}
__acrt_ptd *__cdecl __acrt_getptd(void)
__crt_locale_data *__cdecl _updatetlocinfoEx_nolock(__crt_locale_data **pptlocid, __crt_locale_data *ptlocis)
__crt_state_management::dual_state_global< __crt_locale_data * > __acrt_current_locale_data
Definition: nlsdata.cpp:132

Referenced by __acrt_update_locale_info(), __acrt_update_locale_info_explicit(), _get_current_locale(), and _wsetlocale().

◆ __acrt_update_thread_multibyte_data()

__crt_multibyte_data *__cdecl __acrt_update_thread_multibyte_data ( void  )

Definition at line 361 of file mbctype.cpp.

362{
364}
static __crt_multibyte_data *__cdecl update_thread_multibyte_data_internal(__acrt_ptd *const ptd, __crt_multibyte_data **const current_multibyte_data)
Definition: mbctype.cpp:305

Referenced by __acrt_update_multibyte_info(), __acrt_update_multibyte_info_explicit(), and _get_current_locale().

◆ __ascii_memicmp()

_Check_return_ int __cdecl __ascii_memicmp ( _In_reads_bytes_(count) void const lhs,
_In_reads_bytes_(count) void const rhs,
_In_ size_t  count 
)

◆ __ascii_stricmp()

_Check_return_ int __cdecl __ascii_stricmp ( _In_z_ char const lhs,
_In_z_ char const rhs 
)

◆ __ascii_strnicmp()

_Check_return_ int __cdecl __ascii_strnicmp ( _In_reads_or_z_(count) char const lhs,
_In_reads_or_z_(count) char const rhs,
_In_ size_t  count 
)

◆ __ascii_wcsicmp()

_Check_return_ int __cdecl __ascii_wcsicmp ( _In_z_ const wchar_t lhs,
_In_z_ const wchar_t rhs 
)

Referenced by _wcsicoll(), and _wcsicoll_l().

◆ __ascii_wcsnicmp()

◆ __dcrt_get_narrow_environment_from_os()

_Ret_opt_z_ char *__cdecl __dcrt_get_narrow_environment_from_os ( void  )

Definition at line 75 of file get_environment_from_os.cpp.

76{
77 // Note that we call GetEnvironmentStringsW and convert to multibyte. The
78 // GetEnvironmentStringsA function returns the environment in the OEM code
79 // page, but we need the strings in ANSI.
81 if (!environment.is_valid())
82 return nullptr;
83
84 wchar_t const* const first = environment.get();
86
87 size_t const required_wide_count = last - first;
88#pragma warning(suppress:__WARNING_W2A_BEST_FIT) // 38021 Prefast recommends WC_NO_BEST_FIT_CHARS.
89 size_t const required_narrow_count = static_cast<size_t>(__acrt_WideCharToMultiByte(
90 CP_ACP,
91 0,
92 environment.get(),
93 static_cast<int>(required_wide_count),
94 nullptr,
95 0,
96 nullptr,
97 nullptr));
98
99 if (required_narrow_count == 0)
100 return nullptr;
101
102 __crt_unique_heap_ptr<char> buffer(_malloc_crt_t(char, required_narrow_count));
103 if (!buffer)
104 return nullptr;
105
106#pragma warning(suppress:__WARNING_W2A_BEST_FIT) // 38021 Prefast recommends WC_NO_BEST_FIT_CHARS.
107 int const conversion_result = __acrt_WideCharToMultiByte(
108 CP_ACP,
109 0,
110 environment.get(),
111 static_cast<int>(required_wide_count),
112 buffer.get(),
113 static_cast<int>(required_narrow_count),
114 nullptr,
115 nullptr);
116
117 if (conversion_result == 0)
118 return nullptr;
119
120 return buffer.detach();
121}
return __acrt_WideCharToMultiByte(code_page, 0, buffer.get(), -1, result_size !=0 ? result :nullptr, result_size, nullptr, nullptr)
#define CP_ACP
Definition: compat.h:109
static wchar_t const *__cdecl find_end_of_double_null_terminated_sequence(wchar_t const *const first)
GLuint buffer
Definition: glext.h:5915
const GLint * first
Definition: glext.h:5794
static UINT UINT last
Definition: font.c:45
__crt_unique_handle_t< environment_strings_traits > environment_strings_handle
LPWSTR WINAPI GetEnvironmentStringsW(void)
Definition: environ.c:344

◆ __dcrt_get_or_create_narrow_environment_nolock()

_Deref_ret_opt_z_ char **__cdecl __dcrt_get_or_create_narrow_environment_nolock ( void  )

Definition at line 306 of file environment_initialization.cpp.

307{
308 return common_get_or_create_environment_nolock<char>();
309}

◆ __dcrt_get_or_create_wide_environment_nolock()

_Deref_ret_opt_z_ wchar_t **__cdecl __dcrt_get_or_create_wide_environment_nolock ( void  )

Definition at line 311 of file environment_initialization.cpp.

312{
313 return common_get_or_create_environment_nolock<wchar_t>();
314}

◆ __dcrt_get_wide_environment_from_os()

_Ret_opt_z_ wchar_t *__cdecl __dcrt_get_wide_environment_from_os ( void  )

Definition at line 52 of file get_environment_from_os.cpp.

53{
55 if (!environment)
56 return nullptr;
57
58 // Find the
59 wchar_t const* const first = environment.get();
61
62 size_t const required_count = last - first;
63
64 __crt_unique_heap_ptr<wchar_t> buffer(_malloc_crt_t(wchar_t, required_count));
65 if (!buffer)
66 return nullptr;
67
68 // Note that the multiplication here cannot overflow:
69 memcpy(buffer.get(), environment.get(), required_count * sizeof(wchar_t));
70 return buffer.detach();
71}
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878

◆ __dcrt_set_variable_in_narrow_environment_nolock()

int __cdecl __dcrt_set_variable_in_narrow_environment_nolock ( _In_ _Post_invalid_ char option,
_In_ int  is_top_level_call 
)

◆ __dcrt_set_variable_in_wide_environment_nolock()

int __cdecl __dcrt_set_variable_in_wide_environment_nolock ( _In_ _Post_invalid_ wchar_t option,
_In_ int  is_top_level_call 
)

◆ __dcrt_uninitialize_environments_nolock()

void __cdecl __dcrt_uninitialize_environments_nolock ( void  )

Definition at line 216 of file environment_initialization.cpp.

217{
218 _environ_table .uninitialize(uninitialize_environment_internal<char>);
219 _wenviron_table.uninitialize(uninitialize_environment_internal<wchar_t>);
220
223}
__crt_state_management::dual_state_global< wchar_t ** > _wenviron_table
__crt_state_management::dual_state_global< char ** > _environ_table
wchar_t ** __dcrt_initial_wide_environment
static void free_environment(Character **const environment)
char ** __dcrt_initial_narrow_environment

Referenced by uninitialize_environment().

◆ _ctype_fast_check_internal()

_Check_return_ __forceinline unsigned short __cdecl _ctype_fast_check_internal ( _In_ unsigned char const  c,
_In_ int const  _Mask,
_In_ _locale_t const  locale 
)

Definition at line 1552 of file corecrt_internal.h.

1557{
1558 return locale->locinfo->_public._locale_pctype[c] & _Mask;
1559}
_CRT_MANAGED_FP_DEPRECATE _In_ unsigned int _Mask
Definition: float.h:240
#define c
Definition: ke_i.h:80

Referenced by _isdigit_fast_internal(), and _isleadbyte_fast_internal().

◆ _get_sys_err_msg()

_Ret_z_ __inline char const * _get_sys_err_msg ( size_t const  m)

Definition at line 132 of file corecrt_internal.h.

133{
135 if (m > _sys_last_posix_error || ((size_t)_sys_nerr < m && m < _sys_first_posix_error))
136 return _sys_errlist[_sys_nerr];
137 if (m <= (size_t)_sys_nerr)
138 return _sys_errlist[m];
139 else
142}
size_t const _sys_first_posix_error
Definition: syserr.cpp:113
char const *const _sys_posix_errlist[]
Definition: syserr.cpp:66
size_t const _sys_last_posix_error
Definition: syserr.cpp:114
const GLfloat * m
Definition: glext.h:10848
_CRTIMP char * _sys_errlist[]
Definition: strerror.c:68
_CRTIMP int _sys_nerr
Definition: strerror.c:80
#define _BEGIN_SECURE_CRT_DEPRECATION_DISABLE

Referenced by _perror_internal(), _Success_(), common_strerror(), and common_strerror_s().

◆ _In_CRT_NLS_string_()

_In_ DWORD _In_CRT_NLS_string_ ( _CchSrc  )

◆ _In_NLS_string_()

_In_NLS_string_ ( _CchSrc  )

◆ _invoke_watson_if_error()

_CRT_SECURITYCRITICAL_ATTRIBUTE __forceinline void _invoke_watson_if_error ( _In_ errno_t  expression_error,
_In_opt_z_ wchar_t const expression,
_In_opt_z_ wchar_t const function_name,
_In_opt_z_ wchar_t const file_name,
_In_ unsigned int  line_number,
_In_ uintptr_t  reserved 
)

Definition at line 1593 of file corecrt_internal.h.

1601{
1602 if (expression_error == 0)
1603 {
1604 return;
1605 }
1606
1607 _invoke_watson(expression, function_name, file_name, line_number, reserved);
1608}
int const char const *const int const line_number
Definition: debug_heap.cpp:499
r reserved
Definition: btrfs.c:3006
static LPCWSTR file_name
Definition: protocol.c:147

◆ _invoke_watson_if_oneof()

__forceinline errno_t _invoke_watson_if_oneof ( _In_ errno_t  expression_error,
_In_ errno_t  error_value1,
_In_ errno_t  error_value2,
_In_opt_z_ wchar_t const expression,
_In_opt_z_ wchar_t const function_name,
_In_opt_z_ wchar_t const file_name,
_In_ unsigned int  line_number,
_In_ uintptr_t  reserved 
)

Definition at line 1612 of file corecrt_internal.h.

1622{
1623 if (expression_error == 0 || (expression_error != error_value1 && expression_error != error_value2))
1624 {
1625 return expression_error;
1626 }
1627
1628 _invoke_watson(expression, function_name, file_name, line_number, reserved);
1629}

◆ _isdigit_fast_internal()

_Check_return_ __forceinline unsigned short __cdecl _isdigit_fast_internal ( _In_ unsigned char const  c,
_In_ _locale_t const  locale 
)

Definition at line 1561 of file corecrt_internal.h.

1565{
1567}
_Check_return_ __forceinline unsigned short __cdecl _ctype_fast_check_internal(_In_ unsigned char const c, _In_ int const _Mask, _In_ _locale_t const locale)
#define _DIGIT
Definition: ctype.h:67

Referenced by _ismbcdigit_l(), and __crt_stdio_output::force_decimal_point().

◆ _isleadbyte_fast_internal()

◆ _Out_writes_opt_() [1/3]

_In_ DWORD _In_ LPCWSTR _In_ int _Out_writes_opt_ ( _CbMultiByte  )

◆ _Out_writes_opt_() [2/3]

_In_ DWORD _In_ int _Out_writes_opt_ ( _CchDest  )

◆ _Out_writes_opt_() [3/3]

_In_ DWORD _In_ LPCSTR _In_ int _Out_writes_opt_ ( _CchWideChar  )

◆ _Out_writes_opt_z_()

_Out_writes_opt_z_ ( cchLocaleName  )

◆ _Out_writes_to_()

_Out_writes_to_ ( nBufferLength  ,
return 1 
)

◆ _Out_writes_z_()

_Out_writes_z_ ( buffer_count  )

◆ _Post_writable_byte_size_()

_Check_return_ _Ret_maybenull_ _Post_writable_byte_size_ ( size  )

◆ _Success_() [1/3]

_Success_ ( return = 0) const

◆ _Success_() [2/3]

_Success_ ( return  ,
 
)

◆ _Success_() [3/3]

_Success_ ( return  = = 0)

Deletes the virtual mapping and optionally gives back the page & dirty bit.

Parameters
Process- The process this address belongs to, or NULL if system address.
Address- The address to unmap.
WasDirty- Optional param receiving the dirty bit of the PTE.
Page- Optional param receiving the page number previously mapped to this address.
Returns
Whether there was actually a page mapped at the given address.

Definition at line 57 of file firmware.c.

207{
210
211 /* Check input parameters */
212 if (FirmwareType == NULL)
213 {
215 return FALSE;
216 }
217
218 /* Query firmware type */
220 &BootInfo,
221 sizeof(BootInfo),
222 0);
223 if (!NT_SUCCESS(Status))
224 {
226 return FALSE;
227 }
228
229 *FirmwareType = BootInfo.FirmwareType;
230 return TRUE;
231}
LONG NTSTATUS
Definition: precomp.h:26
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
Status
Definition: gdiplustypes.h:25
@ SystemBootEnvironmentInformation
Definition: extypes.h:307
DWORD BaseSetLastNTError(IN NTSTATUS Status)
Definition: reactos.cpp:167
NTSYSAPI NTSTATUS NTAPI NtQuerySystemInformation(IN SYSTEM_INFORMATION_CLASS SystemInfoClass, OUT PVOID SystemInfoBuffer, IN ULONG SystemInfoBufferSize, OUT PULONG BytesReturned OPTIONAL)

◆ _tolower_fast_internal()

_Check_return_ __forceinline unsigned char __cdecl _tolower_fast_internal ( _In_ unsigned char const  c,
_In_ _locale_t const  locale 
)

Definition at line 1483 of file corecrt_internal.h.

1487{
1488 return locale->locinfo->pclmap[c];
1489}

Referenced by _memicmp_l(), _stricmp_l(), _strnicmp_l(), _towlower_fast_internal(), and __crt_stdio_output::force_decimal_point().

◆ _toupper_fast_internal()

_Check_return_ __forceinline unsigned char __cdecl _toupper_fast_internal ( _In_ unsigned char const  c,
_In_ _locale_t const  locale 
)

Definition at line 1475 of file corecrt_internal.h.

1479{
1480 return locale->locinfo->pcumap[c];
1481}

Referenced by _towupper_fast_internal().

◆ _towlower_fast_internal()

_Check_return_ __forceinline wint_t _towlower_fast_internal ( _In_ unsigned char const  c,
_In_ _locale_t const  locale 
)

Definition at line 1522 of file corecrt_internal.h.

1526{
1527 // Check for iswupper required because lower map assumes using narrow ctype categories.
1528 // towlower uses a locale-sensitive transformation, but only if the wide character
1529 // is considered uppercase in UTF-16.
1530 // _wctype starts at EOF. Add one to map to characters.
1531 if (_wctype[c + 1] & _UPPER)
1532 {
1534 }
1535
1536 return c;
1537}
const unsigned short _wctype[]
Definition: ctype.c:296
_Check_return_ __forceinline unsigned char __cdecl _tolower_fast_internal(_In_ unsigned char const c, _In_ _locale_t const locale)
#define _UPPER
Definition: ctype.h:65

Referenced by _towlower_internal(), and _towlower_l().

◆ _towlower_internal()

_Check_return_ wint_t _towlower_internal ( _In_ unsigned short const  c,
_In_ _locale_t const  locale 
)
inline

Definition at line 1539 of file corecrt_internal.h.

1543{
1544 if (c < 256)
1545 {
1546 return _towlower_fast_internal((unsigned char) c, locale);
1547 }
1548
1549 return _towlower_l(c, locale);
1550}
_Check_return_ __forceinline wint_t _towlower_fast_internal(_In_ unsigned char const c, _In_ _locale_t const locale)
_Check_return_ _CRTIMP wint_t __cdecl _towlower_l(_In_ wint_t c, _In_opt_ _locale_t locale)
Definition: stubs.c:602

Referenced by _wcsicmp_l(), and _wcsnicmp_l().

◆ _towupper_fast_internal()

_Check_return_ __forceinline wint_t _towupper_fast_internal ( _In_ unsigned char const  c,
_In_ _locale_t const  locale 
)

Definition at line 1493 of file corecrt_internal.h.

1497{
1498 // Check for iswlower required because upper map assumes using narrow ctype categories.
1499 // towupper uses a locale-sensitive transformation, but only if the wide character
1500 // is considered lowercase in UTF-16.
1501 // _wctype starts at EOF. Add one to map to characters.
1502 if (_wctype[c + 1] & _LOWER)
1503 {
1505 }
1506 return c;
1507}
_Check_return_ __forceinline unsigned char __cdecl _toupper_fast_internal(_In_ unsigned char const c, _In_ _locale_t const locale)
#define _LOWER
Definition: ctype.h:66

Referenced by _towupper_internal(), and _towupper_l().

◆ _towupper_internal()

_Check_return_ wint_t _towupper_internal ( _In_ unsigned short const  c,
_In_ _locale_t const  locale 
)
inline

Definition at line 1509 of file corecrt_internal.h.

1513{
1514 if (c < 256)
1515 {
1516 return _towupper_fast_internal((unsigned char) c, locale);
1517 }
1518
1519 return _towupper_l(c, locale);
1520}
_Check_return_ __forceinline wint_t _towupper_fast_internal(_In_ unsigned char const c, _In_ _locale_t const locale)
_Check_return_ _CRTIMP wint_t __cdecl _towupper_l(_In_ wint_t c, _In_opt_ _locale_t locale)
Definition: stubs.c:614

◆ _When_()

_Ret_z_ _In_z_ char const _When_ ( return  = = caller_array,
_Post_z_   
)

◆ bool()

typedef bool ( __cdecl __acrt_initialize_pft)

Variable Documentation

◆ __acrt_exception_action_table

struct __crt_signal_action_t const __acrt_exception_action_table[]
extern

Definition at line 20 of file exception_filter.cpp.

Referenced by construct_ptd(), destroy_ptd(), and signal().

◆ __acrt_heap

◆ __acrt_initial_locale_data

◆ __acrt_initial_locale_pointers

__crt_locale_pointers __acrt_initial_locale_pointers
extern

Definition at line 136 of file nlsdata.cpp.

Referenced by setmbcp_internal().

◆ __acrt_initial_multibyte_data

◆ __acrt_lconv

struct lconv* __acrt_lconv
extern

Definition at line 56 of file localeconv.cpp.

Referenced by sync_legacy_variables_lk().

◆ __acrt_lconv_c

◆ __acrt_locale_changed_data

long __acrt_locale_changed_data
extern

Definition at line 31 of file wsetlocale.cpp.

Referenced by __acrt_set_locale_changed().

◆ __acrt_rg_country

__crt_locale_string_table const __acrt_rg_country[]
extern

◆ __acrt_rg_country_count

size_t const __acrt_rg_country_count
extern

◆ __acrt_rg_language

__crt_locale_string_table const __acrt_rg_language[]
extern

◆ __acrt_rg_language_count

size_t const __acrt_rg_language_count
extern

◆ __acrt_signal_action_first_fpe_index

size_t const __acrt_signal_action_first_fpe_index
extern

Definition at line 41 of file exception_filter.cpp.

Referenced by _seh_filter_exe(), and raise().

◆ __acrt_signal_action_fpe_count

size_t const __acrt_signal_action_fpe_count
extern

Definition at line 44 of file exception_filter.cpp.

Referenced by _seh_filter_exe(), and raise().

◆ __acrt_signal_action_table_count

size_t const __acrt_signal_action_table_count
extern

Definition at line 50 of file exception_filter.cpp.

Referenced by siglookup(), signal(), and xcptlookup().

◆ __acrt_signal_action_table_size

size_t const __acrt_signal_action_table_size
extern

Definition at line 47 of file exception_filter.cpp.

Referenced by signal().

◆ __acrt_wide_c_locale_string

wchar_t __acrt_wide_c_locale_string[]
extern

◆ __dcrt_initial_narrow_environment

char** __dcrt_initial_narrow_environment
extern

◆ __dcrt_initial_wide_environment

wchar_t** __dcrt_initial_wide_environment
extern

◆ __globallocalestatus

int __globallocalestatus
extern

Definition at line 13 of file glstatus.cpp.

◆ __lc_time_c

◆ __newclmap

unsigned char const __newclmap[]
extern

Definition at line 446 of file ctype.cpp.

◆ __newctype

unsigned short const __newctype[]
extern

Definition at line 303 of file ctype.cpp.

Referenced by __acrt_locale_initialize_ctype().

◆ __newcumap

unsigned char const __newcumap[]
extern

Definition at line 594 of file ctype.cpp.

◆ _BError

Definition at line 566 of file corecrt_internal.h.

◆ _CbMultiByte

Definition at line 605 of file corecrt_internal.h.

Referenced by _Success_().

◆ _CchDest

_In_ DWORD _In_ int _In_ int _CchDest

Definition at line 585 of file corecrt_internal.h.

◆ _CchSrc

_In_ DWORD _In_ int _CchSrc

Definition at line 563 of file corecrt_internal.h.

Referenced by _Success_().

◆ _CchWideChar

_In_ DWORD _In_ LPCWSTR _In_ int _CchWideChar

Definition at line 607 of file corecrt_internal.h.

Referenced by _Success_().

◆ _CodePage

Definition at line 565 of file corecrt_internal.h.

Referenced by _Success_().

◆ _DWFlags

_In_ DWORD _DWFlags

Definition at line 603 of file corecrt_internal.h.

Referenced by _Success_().

◆ _DWInfoType

_In_ DWORD _DWInfoType

Definition at line 561 of file corecrt_internal.h.

Referenced by _Success_().

◆ _DwMapFlag

_In_ LPCWSTR _In_ DWORD _DwMapFlag

Definition at line 581 of file corecrt_internal.h.

◆ _DWMapFlag

_In_ DWORD _DWMapFlag

Definition at line 593 of file corecrt_internal.h.

◆ _LocaleName

_In_ LPCWSTR _LocaleName

Definition at line 580 of file corecrt_internal.h.

◆ _LpCharType

_In_ int _Out_ LPWORD _LpCharType

Definition at line 564 of file corecrt_internal.h.

Referenced by _Success_().

◆ _LpDefaultChar

Definition at line 618 of file corecrt_internal.h.

Referenced by _Success_().

◆ _LpMultiByteStr

_In_ DWORD _In_ LPCSTR _LpMultiByteStr

Definition at line 604 of file corecrt_internal.h.

Referenced by _Success_().

◆ _LpUsedDefaultChar

Definition at line 619 of file corecrt_internal.h.

Referenced by _Success_().

◆ _LpWideCharStr

_In_ DWORD _In_ LPCWSTR _LpWideCharStr

Definition at line 614 of file corecrt_internal.h.

Referenced by _Success_().

◆ _pfnAllocHook

◆ _sys_first_posix_error

size_t const _sys_first_posix_error
extern

Definition at line 113 of file syserr.cpp.

Referenced by _get_sys_err_msg().

◆ _sys_last_posix_error

size_t const _sys_last_posix_error
extern

Definition at line 114 of file syserr.cpp.

Referenced by _get_sys_err_msg().

◆ _sys_posix_errlist

char const* const _sys_posix_errlist[]
extern

Definition at line 66 of file syserr.cpp.

Referenced by _get_sys_err_msg().

◆ _wctype

const unsigned short _wctype[]
extern

Definition at line 296 of file ctype.c.

Referenced by _towlower_fast_internal(), and _towupper_fast_internal().

◆ buffer_count

_In_ ULONG buffer_count

Definition at line 162 of file corecrt_internal.h.

◆ caller_array_count

_Ret_z_ _In_z_ wchar_t const _In_ size_t caller_array_count

Definition at line 209 of file corecrt_internal.h.

Referenced by __acrt_capture_narrow_argv(), __acrt_capture_wide_argv(), and throw().

◆ cchLocaleName

_In_ int cchLocaleName

Definition at line 1383 of file corecrt_internal.h.

Referenced by __acrt_DownlevelLCIDToLocaleName().

◆ character_count

◆ character_size

_In_ size_t _In_ size_t character_size

Definition at line 306 of file corecrt_internal.h.

Referenced by __acrt_allocate_buffer_for_argv().

◆ code_page

◆ feature_id

_In_ DWORD feature_id

Definition at line 1319 of file corecrt_internal.h.

◆ first_argument

_Ret_z_ _In_z_ wchar_t const* first_argument

Definition at line 206 of file corecrt_internal.h.

◆ length

Definition at line 1320 of file corecrt_internal.h.

◆ result

Definition at line 175 of file corecrt_internal.h.

◆ result_strings

Definition at line 726 of file corecrt_internal.h.

◆ size