Warnings on vc14 were eliminated
[occt.git] / src / OSD / OSD_WNT_1.hxx
CommitLineData
b311480e 1// Copyright (c) 1998-1999 Matra Datavision
973c2be1 2// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 3//
973c2be1 4// This file is part of Open CASCADE Technology software library.
b311480e 5//
d5f74e42 6// This library is free software; you can redistribute it and/or modify it under
7// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 8// by the Free Software Foundation, with special exception defined in the file
9// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10// distribution for complete text of the license and disclaimer of any warranty.
b311480e 11//
973c2be1 12// Alternatively, this file may be used under the terms of Open CASCADE
13// commercial license or contractual agreement.
b311480e 14
7fd59977 15#ifndef __OSD_WNT_H
16# define __OSD_WNT_H
17
18# ifndef STRICT
19# define STRICT
20# endif /* STRICT */
21
22# ifndef _INC_WINDOWS
23# include <windows.h>
24# endif /* _INC_WINDOWS */
25
7fd59977 26# ifndef OSDAPI
27# if !defined(HAVE_NO_DLL)
28# ifdef __OSD_DLL
29# define OSDAPI __declspec( dllexport )
30# else
31# define OSDAPI __declspec( dllimport )
32# endif /* OSD_DLL */
33# else
34# define OSDAPI
35# endif
36# endif /* OSDAPI */
37
7fd59977 38# ifdef __cplusplus
39extern "C" {
40# endif /* __cplusplus */
41
42enum DIR_RESPONSE { DIR_ABORT, DIR_RETRY, DIR_IGNORE };
43
7fd59977 44#define FLAG_READ_PIPE 0x00000001
45#define FLAG_EOF 0x00000002
46#define FLAG_FILE 0x00000004
47#define FLAG_DIRECTORY 0x00000008
48#define FLAG_PIPE 0x00000010
49#define FLAG_SOCKET 0x00000020
50#define FLAG_NAMED_PIPE 0x00000040
51#define FLAG_DEVICE 0x00000080
52#define FLAG_TYPE 0x0000007C
53
54// 2 macros modified for VisualAge
55//#define LODWORD( a ) ( DWORD )( ( ( DWORDLONG )( a ) ) & 0x00000000FFFFFFFF )
56//#define HIDWORD( a ) ( DWORD )( ( ( DWORDLONG )( a ) ) >> 32 )
57
58#define LODWORD( a ) ( DWORD )( ( ( _int64 )( a ) ) & 0x00000000FFFFFFFF )
59#define HIDWORD( a ) ( DWORD )( ( ( _int64 )( a ) ) >> 32 )
60
7fd59977 61typedef struct _file_ace {
62
63 ACE_HEADER header;
64 DWORD dwMask;
65 PSID pSID;
66
67 } FILE_ACE, *PFILE_ACE;
68
d9ff84e8 69typedef void ( *MOVE_DIR_PROC ) ( LPCWSTR, LPCWSTR );
70typedef void ( *COPY_DIR_PROC ) ( LPCWSTR, LPCWSTR );
71typedef void ( *DELETE_DIR_PROC ) ( LPCWSTR );
7fd59977 72
d9ff84e8 73typedef DIR_RESPONSE ( *RESPONSE_DIR_PROC ) ( LPCWSTR );
7fd59977 74
75#define GET_SID( pACE ) ( ( PSID )( ( ( PBYTE )pACE ) + \
76 sizeof ( ACE_HEADER ) + \
77 sizeof ( DWORD ) \
78 ) \
79 )
80
81#define GET_MSK( pACE ) ( ( PDWORD )( ( ( PBYTE )pACE ) + \
82 sizeof ( ACE_HEADER ) \
83 ) \
84 )
85
86PSECURITY_DESCRIPTOR OSDAPI AllocSD ( void );
87void OSDAPI FreeSD ( PSECURITY_DESCRIPTOR );
88
89LPVOID OSDAPI GetTokenInformationEx ( HANDLE, TOKEN_INFORMATION_CLASS );
90void OSDAPI FreeTokenInformation ( LPVOID );
91
d9ff84e8 92PSECURITY_DESCRIPTOR OSDAPI GetFileSecurityEx ( LPCWSTR, SECURITY_INFORMATION );
7fd59977 93void OSDAPI FreeFileSecurity ( PSECURITY_DESCRIPTOR );
94
7fd59977 95PACL OSDAPI CreateAcl ( DWORD );
96void OSDAPI FreeAcl ( PACL );
97
98BOOL OSDAPI PredefinedSid ( PSID );
99BOOL OSDAPI NtPredefinedSid ( PSID );
100PSID OSDAPI AdminSid ( void );
101PSID OSDAPI WorldSid ( void );
102PSID OSDAPI InteractiveSid ( void );
103PSID OSDAPI NetworkSid ( void );
104PSID OSDAPI LocalSid ( void );
105PSID OSDAPI DialupSid ( void );
106PSID OSDAPI BatchSid ( void );
107PSID OSDAPI CreatorOwnerSid ( void );
108PSID OSDAPI NullSid ( void );
109PSID OSDAPI NtSid ( void );
110
7fd59977 111PVOID OSDAPI AllocAccessAllowedAce ( DWORD, BYTE, PSID );
112void OSDAPI FreeAce ( PVOID );
113
d9ff84e8 114BOOL OSDAPI MoveDirectory ( LPCWSTR, LPCWSTR );
115BOOL OSDAPI CopyDirectory ( LPCWSTR, LPCWSTR );
7fd59977 116
7fd59977 117void OSDAPI SetMoveDirectoryProc ( MOVE_DIR_PROC );
118void OSDAPI SetCopyDirectoryProc ( COPY_DIR_PROC );
119void OSDAPI SetResponseDirectoryProc ( RESPONSE_DIR_PROC );
120
7fd59977 121# ifdef __cplusplus
122}
123# endif /* __cplusplus */
124
125#endif /* __OSD_WNT_H */