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 | |
68df8478 |
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 | |
26 | # ifdef __cplusplus |
27 | extern "C" { |
28 | # endif /* __cplusplus */ |
29 | |
30 | enum DIR_RESPONSE { DIR_ABORT, DIR_RETRY, DIR_IGNORE }; |
31 | |
32 | #define FLAG_READ_PIPE 0x00000001 |
33 | #define FLAG_EOF 0x00000002 |
34 | #define FLAG_FILE 0x00000004 |
35 | #define FLAG_DIRECTORY 0x00000008 |
36 | #define FLAG_PIPE 0x00000010 |
37 | #define FLAG_SOCKET 0x00000020 |
38 | #define FLAG_NAMED_PIPE 0x00000040 |
39 | #define FLAG_DEVICE 0x00000080 |
40 | #define FLAG_TYPE 0x0000007C |
41 | |
42 | // 2 macros modified for VisualAge |
43 | //#define LODWORD( a ) ( DWORD )( ( ( DWORDLONG )( a ) ) & 0x00000000FFFFFFFF ) |
44 | //#define HIDWORD( a ) ( DWORD )( ( ( DWORDLONG )( a ) ) >> 32 ) |
45 | |
46 | #define LODWORD( a ) ( DWORD )( ( ( _int64 )( a ) ) & 0x00000000FFFFFFFF ) |
47 | #define HIDWORD( a ) ( DWORD )( ( ( _int64 )( a ) ) >> 32 ) |
48 | |
49 | typedef struct _file_ace { |
50 | |
51 | ACE_HEADER header; |
52 | DWORD dwMask; |
53 | PSID pSID; |
54 | |
55 | } FILE_ACE, *PFILE_ACE; |
56 | |
57 | typedef void ( *MOVE_DIR_PROC ) ( LPCWSTR, LPCWSTR ); |
58 | typedef void ( *COPY_DIR_PROC ) ( LPCWSTR, LPCWSTR ); |
59 | typedef void ( *DELETE_DIR_PROC ) ( LPCWSTR ); |
60 | |
61 | typedef DIR_RESPONSE ( *RESPONSE_DIR_PROC ) ( LPCWSTR ); |
62 | |
63 | #define GET_SID( pACE ) ( ( PSID )( ( ( PBYTE )pACE ) + \ |
64 | sizeof ( ACE_HEADER ) + \ |
65 | sizeof ( DWORD ) \ |
66 | ) \ |
67 | ) |
68 | |
69 | #define GET_MSK( pACE ) ( ( PDWORD )( ( ( PBYTE )pACE ) + \ |
70 | sizeof ( ACE_HEADER ) \ |
71 | ) \ |
72 | ) |
73 | |
74 | PSECURITY_DESCRIPTOR AllocSD ( void ); |
75 | void FreeSD ( PSECURITY_DESCRIPTOR ); |
76 | |
77 | LPVOID GetTokenInformationEx ( HANDLE, TOKEN_INFORMATION_CLASS ); |
78 | void FreeTokenInformation ( LPVOID ); |
79 | |
80 | PSECURITY_DESCRIPTOR GetFileSecurityEx ( LPCWSTR, SECURITY_INFORMATION ); |
81 | void FreeFileSecurity ( PSECURITY_DESCRIPTOR ); |
82 | |
83 | PACL CreateAcl ( DWORD ); |
84 | void FreeAcl ( PACL ); |
85 | |
86 | BOOL PredefinedSid ( PSID ); |
87 | BOOL NtPredefinedSid ( PSID ); |
88 | PSID AdminSid ( void ); |
89 | PSID WorldSid ( void ); |
90 | PSID InteractiveSid ( void ); |
91 | PSID NetworkSid ( void ); |
92 | PSID LocalSid ( void ); |
93 | PSID DialupSid ( void ); |
94 | PSID BatchSid ( void ); |
95 | PSID CreatorOwnerSid ( void ); |
96 | PSID NullSid ( void ); |
97 | PSID NtSid ( void ); |
98 | |
99 | PVOID AllocAccessAllowedAce ( DWORD, BYTE, PSID ); |
100 | void FreeAce ( PVOID ); |
101 | |
102 | BOOL MoveDirectory ( LPCWSTR, LPCWSTR ); |
103 | BOOL CopyDirectory ( LPCWSTR, LPCWSTR ); |
104 | |
105 | void SetMoveDirectoryProc ( MOVE_DIR_PROC ); |
106 | void SetCopyDirectoryProc ( COPY_DIR_PROC ); |
107 | void SetResponseDirectoryProc ( RESPONSE_DIR_PROC ); |
108 | |
109 | # ifdef __cplusplus |
110 | } |
111 | # endif /* __cplusplus */ |
112 | |
113 | #endif /* __OSD_WNT_H */ |