]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/win32/winapi.h
Suppress superfluous warning messages if SD polling
[bacula/bacula] / bacula / src / win32 / winapi.h
index fb79e55c4d29af5c3c99e09f22e561a8bd259cdf..fcd6c5e6994cdb32decd2baeabc934dde05c74e9 100644 (file)
@@ -1,3 +1,30 @@
+/*
+   Bacula® - The Network Backup Solution
+
+   Copyright (C) 2003-2008 Free Software Foundation Europe e.V.
+
+   The main author of Bacula is Kern Sibbald, with contributions from
+   many others, a complete list can be found in the file AUTHORS.
+   This program is Free Software; you can redistribute it and/or
+   modify it under the terms of version three of the GNU Affero General Public
+   License as published by the Free Software Foundation and included
+   in the file LICENSE.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU Affero General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+   Bacula® is a registered trademark of Kern Sibbald.
+   The licensor of Bacula is the Free Software Foundation Europe
+   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+   Switzerland, email:ftf@fsfeurope.org.
+*/
 /*
  * Windows APIs that are different for each system.
  *   We use pointers to the entry points so that a
@@ -5,20 +32,6 @@
  *
  *     Kern Sibbald MMIII
  */
-/*
-   Copyright (C) 2003-2006 Kern Sibbald
-
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License
-   version 2 as amended with additional clauses defined in the
-   file LICENSE in the main source directory.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
-   the file LICENSE for additional details.
-
- */
 
 #ifndef __WINAPI_H
 #define __WINAPI_H
@@ -45,6 +58,7 @@ typedef char POOLMEM;
 // as opposed to UCS2 which means characters 0x10000-0x10ffff are
 // valid and result in 4 byte UTF-8 encodings.
 #define MAX_PATH_UTF8    MAX_PATH*4  // strict upper bound on UTF-16 to UTF-8 conversion
+
 // from
 // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/getfileattributesex.asp
 // In the ANSI version of this function, the name is limited to
@@ -60,9 +74,9 @@ int make_win32_path_UTF8_2_wchar(POOLMEM **pszUCS, const char *pszUTF, BOOL* pBI
 // init with win9x, but maybe set to NT in InitWinAPI
 extern DWORD DLL_IMP_EXP g_platform_id;
 extern DWORD DLL_IMP_EXP g_MinorVersion;
+extern DWORD DLL_IMP_EXP g_MajorVersion;
 
 /* In ADVAPI32.DLL */
-
 typedef BOOL (WINAPI * t_OpenProcessToken)(HANDLE, DWORD, PHANDLE);
 typedef BOOL (WINAPI * t_AdjustTokenPrivileges)(HANDLE, BOOL,
           PTOKEN_PRIVILEGES, DWORD, PTOKEN_PRIVILEGES, PDWORD);
@@ -121,7 +135,35 @@ typedef DWORD (WINAPI * t_GetCurrentDirectoryW) (DWORD, LPWSTR);
 
 typedef BOOL (WINAPI * t_GetVolumePathNameW) (LPCWSTR, LPWSTR, DWORD);
 typedef BOOL (WINAPI * t_GetVolumeNameForVolumeMountPointW) (LPCWSTR, LPWSTR, DWORD);
-  
+
+typedef BOOL (WINAPI * t_AttachConsole) (DWORD);
+
+typedef BOOL (WINAPI *t_CreateProcessA) (
+   LPCSTR,
+   LPSTR,
+   LPSECURITY_ATTRIBUTES,
+   LPSECURITY_ATTRIBUTES,
+   BOOL,
+   DWORD,
+   PVOID,
+   LPCSTR,
+   LPSTARTUPINFOA,
+   LPPROCESS_INFORMATION);
+typedef BOOL (WINAPI *t_CreateProcessW) (
+   LPCWSTR,
+   LPWSTR,
+   LPSECURITY_ATTRIBUTES,
+   LPSECURITY_ATTRIBUTES,
+   BOOL,
+   DWORD,
+   PVOID,
+   LPCWSTR,
+   LPSTARTUPINFOW,
+   LPPROCESS_INFORMATION);
+
+extern t_CreateProcessA DLL_IMP_EXP p_CreateProcessA;
+extern t_CreateProcessW DLL_IMP_EXP p_CreateProcessW;
+
 extern t_GetFileAttributesA   DLL_IMP_EXP p_GetFileAttributesA;
 extern t_GetFileAttributesW   DLL_IMP_EXP p_GetFileAttributesW;
 
@@ -159,7 +201,14 @@ extern t_GetCurrentDirectoryW DLL_IMP_EXP p_GetCurrentDirectoryW;
 extern t_GetVolumePathNameW DLL_IMP_EXP p_GetVolumePathNameW;
 extern t_GetVolumeNameForVolumeMountPointW DLL_IMP_EXP p_GetVolumeNameForVolumeMountPointW;
 
+extern t_AttachConsole DLL_IMP_EXP p_AttachConsole;
+
 void InitWinAPIWrapper();
+
+/* In SHFolder.dll on older systems, and now Shell32.dll */
+typedef BOOL (WINAPI * t_SHGetFolderPath)(HWND, int, HANDLE, DWORD, LPTSTR);
+extern t_SHGetFolderPath  DLL_IMP_EXP p_SHGetFolderPath;
+
 #endif
 
 #endif /* __WINAPI_H */