1 // Copyright (c) 1998-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
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
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.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
24 # endif /* _INC_WINDOWS */
27 # if !defined(HAVE_NO_DLL)
29 # define OSDAPI __declspec( dllexport )
31 # define OSDAPI __declspec( dllimport )
38 #if defined(__CYGWIN32__) || defined(__MINGW32__)
44 # endif /* __cplusplus */
46 enum DIR_RESPONSE { DIR_ABORT, DIR_RETRY, DIR_IGNORE };
48 #define FLAG_READ_PIPE 0x00000001
49 #define FLAG_EOF 0x00000002
50 #define FLAG_FILE 0x00000004
51 #define FLAG_DIRECTORY 0x00000008
52 #define FLAG_PIPE 0x00000010
53 #define FLAG_SOCKET 0x00000020
54 #define FLAG_NAMED_PIPE 0x00000040
55 #define FLAG_DEVICE 0x00000080
56 #define FLAG_TYPE 0x0000007C
58 // 2 macros modified for VisualAge
59 //#define LODWORD( a ) ( DWORD )( ( ( DWORDLONG )( a ) ) & 0x00000000FFFFFFFF )
60 //#define HIDWORD( a ) ( DWORD )( ( ( DWORDLONG )( a ) ) >> 32 )
62 #define LODWORD( a ) ( DWORD )( ( ( _int64 )( a ) ) & 0x00000000FFFFFFFF )
63 #define HIDWORD( a ) ( DWORD )( ( ( _int64 )( a ) ) >> 32 )
65 typedef struct _file_ace {
71 } FILE_ACE, *PFILE_ACE;
73 typedef void ( *MOVE_DIR_PROC ) ( LPCWSTR, LPCWSTR );
74 typedef void ( *COPY_DIR_PROC ) ( LPCWSTR, LPCWSTR );
75 typedef void ( *DELETE_DIR_PROC ) ( LPCWSTR );
77 typedef DIR_RESPONSE ( *RESPONSE_DIR_PROC ) ( LPCWSTR );
79 #define GET_SID( pACE ) ( ( PSID )( ( ( PBYTE )pACE ) + \
80 sizeof ( ACE_HEADER ) + \
85 #define GET_MSK( pACE ) ( ( PDWORD )( ( ( PBYTE )pACE ) + \
86 sizeof ( ACE_HEADER ) \
90 PSECURITY_DESCRIPTOR OSDAPI AllocSD ( void );
91 void OSDAPI FreeSD ( PSECURITY_DESCRIPTOR );
93 LPVOID OSDAPI GetTokenInformationEx ( HANDLE, TOKEN_INFORMATION_CLASS );
94 void OSDAPI FreeTokenInformation ( LPVOID );
96 PSECURITY_DESCRIPTOR OSDAPI GetFileSecurityEx ( LPCWSTR, SECURITY_INFORMATION );
97 void OSDAPI FreeFileSecurity ( PSECURITY_DESCRIPTOR );
99 PACL OSDAPI CreateAcl ( DWORD );
100 void OSDAPI FreeAcl ( PACL );
102 BOOL OSDAPI PredefinedSid ( PSID );
103 BOOL OSDAPI NtPredefinedSid ( PSID );
104 PSID OSDAPI AdminSid ( void );
105 PSID OSDAPI WorldSid ( void );
106 PSID OSDAPI InteractiveSid ( void );
107 PSID OSDAPI NetworkSid ( void );
108 PSID OSDAPI LocalSid ( void );
109 PSID OSDAPI DialupSid ( void );
110 PSID OSDAPI BatchSid ( void );
111 PSID OSDAPI CreatorOwnerSid ( void );
112 PSID OSDAPI NullSid ( void );
113 PSID OSDAPI NtSid ( void );
115 PVOID OSDAPI AllocAccessAllowedAce ( DWORD, BYTE, PSID );
116 void OSDAPI FreeAce ( PVOID );
118 BOOL OSDAPI MoveDirectory ( LPCWSTR, LPCWSTR );
119 BOOL OSDAPI CopyDirectory ( LPCWSTR, LPCWSTR );
121 void OSDAPI SetMoveDirectoryProc ( MOVE_DIR_PROC );
122 void OSDAPI SetCopyDirectoryProc ( COPY_DIR_PROC );
123 void OSDAPI SetResponseDirectoryProc ( RESPONSE_DIR_PROC );
127 # endif /* __cplusplus */
129 #endif /* __OSD_WNT_H */