X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Flib%2Fwinapi.c;h=c23d25f4cdf61026e59e17401e8ca58db2f881ea;hb=0c2ac5a228ce31825b684183add6e0fba88031a0;hp=45d382ad9e83dfba696dae3db78ee47f910d46f8;hpb=9a661a66dbee0ae518b8c6898987437a7bfebd81;p=bacula%2Fbacula diff --git a/bacula/src/lib/winapi.c b/bacula/src/lib/winapi.c index 45d382ad9e..c23d25f4cd 100644 --- a/bacula/src/lib/winapi.c +++ b/bacula/src/lib/winapi.c @@ -78,6 +78,9 @@ t_SetCurrentDirectoryW p_SetCurrentDirectoryW = NULL; t_GetCurrentDirectoryA p_GetCurrentDirectoryA = NULL; t_GetCurrentDirectoryW p_GetCurrentDirectoryW = NULL; +t_GetVolumePathNameW p_GetVolumePathNameW = NULL; +t_GetVolumeNameForVolumeMountPointW p_GetVolumeNameForVolumeMountPointW = NULL; + #ifdef WIN32_VSS void VSSCleanup() @@ -143,6 +146,14 @@ InitWinAPIWrapper() GetProcAddress(hLib, "GetCurrentDirectoryA"); p_GetCurrentDirectoryW = (t_GetCurrentDirectoryW) GetProcAddress(hLib, "GetCurrentDirectoryW"); + + /* some special stuff we need for VSS + but statically linkage doesn't work on Win 9x */ + p_GetVolumePathNameW = (t_GetVolumePathNameW) + GetProcAddress(hLib, "GetVolumePathNameW"); + p_GetVolumeNameForVolumeMountPointW = (t_GetVolumeNameForVolumeMountPointW) + GetProcAddress(hLib, "GetVolumeNameForVolumeMountPointW"); + FreeLibrary(hLib); } @@ -206,6 +217,9 @@ InitWinAPIWrapper() p_wunlink = NULL; p_wmkdir = NULL; p_wopen = NULL; + + p_GetVolumePathNameW = NULL; + p_GetVolumeNameForVolumeMountPointW = NULL; } /* decide which vss class to initialize */