mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
call vswprintf@msvcrt in Wine's UNICODE version
svn path=/trunk/; revision=11233
This commit is contained in:
parent
8d52d923ed
commit
b0468e7ffa
2 changed files with 31 additions and 11 deletions
|
@ -18,10 +18,6 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <locale.h>
|
||||
#include <time.h>
|
||||
|
||||
#define NONAMELESSUNION
|
||||
#include "winefile.h"
|
||||
|
||||
#include "resource.h"
|
||||
|
@ -171,6 +167,26 @@ extern int call_stat(
|
|||
unsigned long* plinks
|
||||
);
|
||||
|
||||
/* call vswprintf() in msvcrt.dll */
|
||||
int swprintf(wchar_t* buffer, const wchar_t* fmt, ...)
|
||||
{
|
||||
static int (__cdecl *vswprintf)(wchar_t*, const wchar_t*, va_list);
|
||||
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
if (!vswprintf) {
|
||||
HMODULE hmod = LoadLibraryA("msvcrt");
|
||||
vswprintf = (int(__cdecl*)(wchar_t*,const wchar_t*,va_list)) GetProcAddress(hmod, "vswprintf");
|
||||
}
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = vswprintf(buffer, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -28,20 +28,24 @@
|
|||
#define NOIMAGE
|
||||
#define NOTAPE
|
||||
|
||||
#define NONAMELESSUNION
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
#include <commctrl.h>
|
||||
#include <commdlg.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <locale.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef UNICODE
|
||||
#define _UNICODE
|
||||
#include <wchar.h>
|
||||
#endif
|
||||
#include <tchar.h>
|
||||
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
#include <commctrl.h>
|
||||
#include <commdlg.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <malloc.h> /* for alloca() */
|
||||
#endif
|
||||
|
@ -52,7 +56,7 @@
|
|||
#include <objbase.h>
|
||||
#include <shellapi.h>
|
||||
#include <shlobj.h>
|
||||
#endif
|
||||
#endif /* _NO_EXTENSIONS */
|
||||
|
||||
#ifndef FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
|
||||
#define FILE_ATTRIBUTE_ENCRYPTED 0x00000040
|
||||
|
|
Loading…
Reference in a new issue