VC 编译crt不同版本,Debug/Release混用问题

extern "C"	int __CRTDECL _imp__swprintf(
	_Pre_notnull_ _Post_z_        wchar_t*       const _Buffer,
	_In_                          size_t         const _BufferCount,
	_In_z_ _Printf_format_string_ wchar_t const* const _Format,
	...)
{
	int _Result;
	va_list _ArgList;
	__crt_va_start(_ArgList, _Format);
	_Result = _vswprintf_c_l(_Buffer, _BufferCount, _Format, NULL, _ArgList);
	__crt_va_end(_ArgList);
	return _Result;
}

extern "C" int __CRTDECL _imp__vswprintf(
	_Pre_notnull_ _Post_z_                  wchar_t*       const _Buffer,
	_In_                                    size_t         const _BufferCount,
	_In_z_ _Printf_format_string_params_(1) wchar_t const* const _Format,
	va_list              _ArgList
	)
{
	return _vswprintf_c_l(_Buffer, _BufferCount, _Format, NULL, _ArgList);
}

extern "C"  wchar_t* __cdecl _imp__wcslwr(
	_Inout_z_ wchar_t* _String
	)
{
	return wcslwr(_String);
}


extern "C"  wchar_t* __cdecl _imp__wcsncpy(
	_Pre_notnull_ _Post_maybez_ wchar_t (&_Destination)[], _In_reads_or_z_(_Count) wchar_t const* _Source, _In_ size_t _Count
	)
{
	return wcsncpy(_Destination, _Source, _Count);
}


extern "C"  wchar_t* __cdecl _imp__wcscat(
	wchar_t (&_Destination)[], _In_z_ wchar_t const* _Source
	)
{
	return wcscat(_Destination, _Source);
}

extern "C"  int __cdecl _except_handler4_common(
	)
{
	return 0;
}

#ifndef _DEBUG

extern "C"  int __cdecl _CrtDbgReport(
	)
{
	return 0;
}

extern "C"  int __cdecl _CrtDbgReportW(
	)
{
	return 0;
}

#undef _malloc_dbg
extern "C"  void * __cdecl _malloc_dbg(int nSize, int nType, CHAR *pFile, int nLine)
{
	return malloc(nSize);
}

#endif // _DEBUG
posted @ 2024-01-20 14:17  Yofoo  阅读(12)  评论(0编辑  收藏  举报