]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/winapi.h
Apply fix from Martin Simmons to clear structure before
[bacula/bacula] / bacula / src / lib / winapi.h
index 8fed7e90e5a3f391abcbb748ba83826cd6338c97..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 */
@@ -69,6 +72,7 @@ typedef int (__cdecl * t_wopen)  (const wchar_t *, int, ...);
 extern t_wunlink   p_wunlink;
 extern t_wmkdir    p_wmkdir;
 extern t_wopen     p_wopen;
+
 /* In KERNEL32.DLL */
 typedef BOOL (WINAPI * t_GetFileAttributesExA)(LPCSTR, GET_FILEEX_INFO_LEVELS,
        LPVOID);
@@ -105,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;
 
@@ -134,6 +141,16 @@ 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_pVSSClient;
+#endif
+
+void InitWinAPIWrapper();
 #endif
 
 #endif /* __WINAPI_H */