mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
call vswprintf@msvcrt in Wine's UNICODE version
svn path=/trunk/; revision=11233
This commit is contained in:
@@ -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,19 +28,23 @@
|
||||
#define NOIMAGE
|
||||
#define NOTAPE
|
||||
|
||||
#ifdef UNICODE
|
||||
#define _UNICODE
|
||||
#include <wchar.h>
|
||||
#endif
|
||||
#include <tchar.h>
|
||||
|
||||
#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>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <malloc.h> /* for alloca() */
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user