1 /* 2 * COPYRIGHT: GNU GPL, see COPYING in the top level directory 3 * PROJECT: ReactOS crt library 4 * FILE: lib/sdk/crt/printf/vfwprintf_s.c 5 * PURPOSE: Implementation of vfwprintf 6 * PROGRAMMER: Timo Kreuzer 7 * Samuel Serapi�n 8 */ 9 10 #define MINGW_HAS_SECURE_API 1 11 12 #include <stdio.h> 13 #include <stdarg.h> 14 #include <internal/safecrt.h> 15 16 int __cdecl wstreamout(FILE *stream, const wchar_t *format, va_list argptr); 17 18 int 19 __cdecl 20 vfwprintf_s(FILE* file, const wchar_t *format, va_list argptr) 21 { 22 int ret; 23 24 if(!MSVCRT_CHECK_PMT( file != NULL)) { 25 _set_errno(EINVAL); 26 return -1; 27 } 28 29 _lock_file(file); 30 ret = wstreamout(file, format, argptr); 31 _unlock_file(file); 32 33 return ret; 34 } 35