From 16dfc33e50e3c303fd41eb3d7b15fe237606ff88 Mon Sep 17 00:00:00 2001 From: Thorsten Engel Date: Tue, 10 May 2005 09:15:38 +0000 Subject: [PATCH] -- load cwprintf and cgetws dynamically via winapi git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2019 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/lib/winapi.c | 13 ++++++++++++- bacula/src/lib/winapi.h | 11 +++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/bacula/src/lib/winapi.c b/bacula/src/lib/winapi.c index 3c1d16390d..9a5f6532cf 100644 --- a/bacula/src/lib/winapi.c +++ b/bacula/src/lib/winapi.c @@ -49,6 +49,10 @@ t_CreateFileW p_CreateFileW = NULL; t_wunlink p_wunlink = NULL; t_wmkdir p_wmkdir = NULL; t_wopen p_wopen = NULL; + +t_cgetws p_cgetws = NULL; +t_cwprintf p_cwprintf = NULL; + t_GetFileAttributesA p_GetFileAttributesA = NULL; t_GetFileAttributesW p_GetFileAttributesW = NULL; @@ -145,7 +149,14 @@ InitWinAPIWrapper() /* wopen */ p_wopen = (t_wopen) GetProcAddress(hLib, "_wopen"); - + + /* cgetws */ + p_cgetws = (t_cgetws) + GetProcAddress (hLib, "_cgetws"); + /* cwprintf */ + p_cwprintf = (t_cwprintf) + GetProcAddress (hLib, "_cwprintf"); + FreeLibrary(hLib); } diff --git a/bacula/src/lib/winapi.h b/bacula/src/lib/winapi.h index 2e8216d769..b57dbb6802 100644 --- a/bacula/src/lib/winapi.h +++ b/bacula/src/lib/winapi.h @@ -66,9 +66,15 @@ typedef int (__cdecl * t_wunlink) (const wchar_t *); typedef int (__cdecl * t_wmkdir) (const wchar_t *); typedef int (__cdecl * t_wopen) (const wchar_t *, int, ...); +typedef wchar_t* (__cdecl *t_cgetws) (wchar_t *); +typedef int (__cdecl *t_cwprintf) (const wchar_t *, ...); + extern t_wunlink p_wunlink; extern t_wmkdir p_wmkdir; extern t_wopen p_wopen; + +extern t_cgetws p_cgetws; +extern t_cwprintf p_cwprintf; /* In KERNEL32.DLL */ typedef BOOL (WINAPI * t_GetFileAttributesExA)(LPCSTR, GET_FILEEX_INFO_LEVELS, LPVOID); @@ -135,6 +141,11 @@ extern t_SetCurrentDirectoryW p_SetCurrentDirectoryW; extern t_GetCurrentDirectoryA p_GetCurrentDirectoryA; extern t_GetCurrentDirectoryW p_GetCurrentDirectoryW; +#ifdef WIN32_VSS +class VSSClient; +extern VSSClient g_VSSClient; +#endif + void InitWinAPIWrapper(); #endif -- 2.39.5