]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/winapi.h
Add missing cast
[bacula/bacula] / bacula / src / lib / winapi.h
index b57dbb6802abe8405ac7e8e996bafd98495b1248..a138f04f470c29197e468e6cf981ea5df1e25861 100644 (file)
 
 #if defined(HAVE_CYGWIN) || defined(HAVE_WIN32)
 
+#ifndef POOLMEM
+typedef char POOLMEM;
+#endif
+
 // unicode enabling of win 32 needs some defines and functions
-#define MAX_PATH_UNICODE 32767
 #define MAX_PATH_UTF8    MAX_PATH*3
 
 int wchar_2_UTF8(char *pszUTF, const WCHAR *pszUCS, int cchChar = MAX_PATH_UTF8);
-int UTF8_2_wchar(WCHAR *pszUCS, const char *pszUTF, int cchWideChar = MAX_PATH);
+int UTF8_2_wchar(POOLMEM **pszUCS, const char *pszUTF);
 
 
 /* In ADVAPI32.DLL */
@@ -66,15 +69,10 @@ 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);
@@ -111,6 +109,9 @@ typedef BOOL (WINAPI * t_SetCurrentDirectoryW) (LPCWSTR);
 typedef DWORD (WINAPI * t_GetCurrentDirectoryA) (DWORD, LPSTR);
 typedef DWORD (WINAPI * t_GetCurrentDirectoryW) (DWORD, LPWSTR);
 
+typedef BOOL (WINAPI * t_GetVolumePathNameW) (LPCWSTR, LPWSTR, DWORD);
+typedef BOOL (WINAPI * t_GetVolumeNameForVolumeMountPointW) (LPCWSTR, LPWSTR, DWORD);
+  
 extern t_GetFileAttributesA   p_GetFileAttributesA;
 extern t_GetFileAttributesW   p_GetFileAttributesW;
 
@@ -141,9 +142,12 @@ extern t_SetCurrentDirectoryW p_SetCurrentDirectoryW;
 extern t_GetCurrentDirectoryA p_GetCurrentDirectoryA;
 extern t_GetCurrentDirectoryW p_GetCurrentDirectoryW;
 
+extern t_GetVolumePathNameW p_GetVolumePathNameW;
+extern t_GetVolumeNameForVolumeMountPointW p_GetVolumeNameForVolumeMountPointW;
+          
 #ifdef WIN32_VSS
-class VSSClient;
-extern VSSClient g_VSSClient;
+class  VSSClient;
+extern VSSClient* g_pVSSClient;
 #endif
 
 void InitWinAPIWrapper();