Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:37

0001 // Copyright (c) 1998-1999 Matra Datavision
0002 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0003 //
0004 // This file is part of Open CASCADE Technology software library.
0005 //
0006 // This library is free software; you can redistribute it and/or modify it under
0007 // the terms of the GNU Lesser General Public License version 2.1 as published
0008 // by the Free Software Foundation, with special exception defined in the file
0009 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0010 // distribution for complete text of the license and disclaimer of any warranty.
0011 //
0012 // Alternatively, this file may be used under the terms of Open CASCADE
0013 // commercial license or contractual agreement.
0014 
0015 #ifndef OSD_WNT_HeaderFile
0016 #define OSD_WNT_HeaderFile
0017 
0018 # ifndef STRICT
0019 #  define STRICT
0020 # endif  /* STRICT */
0021 
0022 # ifndef _INC_WINDOWS
0023 #  include <windows.h>
0024 # endif  /* _INC_WINDOWS */
0025 
0026 # ifdef __cplusplus
0027 extern "C" {
0028 # endif  /* __cplusplus */
0029 
0030 enum DIR_RESPONSE { DIR_ABORT, DIR_RETRY, DIR_IGNORE };
0031 
0032 #define FLAG_READ_PIPE  0x00000001
0033 #define FLAG_EOF        0x00000002
0034 #define FLAG_FILE       0x00000004
0035 #define FLAG_DIRECTORY  0x00000008
0036 #define FLAG_PIPE       0x00000010
0037 #define FLAG_SOCKET     0x00000020
0038 #define FLAG_NAMED_PIPE 0x00000040
0039 #define FLAG_DEVICE     0x00000080
0040 #define FLAG_TYPE       0x0000007C
0041 
0042 // 2 macros modified for VisualAge
0043 //#define LODWORD( a ) ( DWORD )(   ( ( DWORDLONG )( a ) ) & 0x00000000FFFFFFFF   )
0044 //#define HIDWORD( a ) ( DWORD )(   ( ( DWORDLONG )( a ) ) >> 32                  )
0045 
0046 #define LODWORD( a ) ( DWORD )(   ( ( _int64 )( a ) ) & 0x00000000FFFFFFFF   )
0047 #define HIDWORD( a ) ( DWORD )(   ( ( _int64 )( a ) ) >> 32                  )
0048 
0049 typedef struct _file_ace {
0050 
0051                 ACE_HEADER header;
0052                 DWORD      dwMask;
0053                 PSID       pSID;
0054 
0055                } FILE_ACE, *PFILE_ACE;
0056 
0057 typedef void ( *MOVE_DIR_PROC   ) ( LPCWSTR, LPCWSTR );
0058 typedef void ( *COPY_DIR_PROC   ) ( LPCWSTR, LPCWSTR );
0059 typedef void ( *DELETE_DIR_PROC ) ( LPCWSTR          );
0060 
0061 typedef DIR_RESPONSE ( *RESPONSE_DIR_PROC ) ( LPCWSTR );
0062 
0063 #define GET_SID( pACE ) (  ( PSID )(   (  ( PBYTE )pACE    ) + \
0064                                        sizeof ( ACE_HEADER ) + \
0065                                        sizeof ( DWORD      )   \
0066                                    )                           \
0067                         )
0068 
0069 #define GET_MSK( pACE ) (  ( PDWORD )(   (  ( PBYTE )pACE    ) + \
0070                                          sizeof ( ACE_HEADER )   \
0071                                      )                           \
0072                         )
0073 
0074 PSECURITY_DESCRIPTOR AllocSD ( void                 );
0075 void                 FreeSD  ( PSECURITY_DESCRIPTOR );
0076 
0077 LPVOID GetTokenInformationEx ( HANDLE, TOKEN_INFORMATION_CLASS );
0078 void   FreeTokenInformation  ( LPVOID                          );
0079 
0080 PSECURITY_DESCRIPTOR GetFileSecurityEx ( LPCWSTR, SECURITY_INFORMATION );
0081 void                 FreeFileSecurity  ( PSECURITY_DESCRIPTOR          );
0082 
0083 PACL CreateAcl ( DWORD );
0084 void FreeAcl   ( PACL  );
0085 
0086 BOOL PredefinedSid   ( PSID );
0087 BOOL NtPredefinedSid ( PSID );
0088 PSID AdminSid        ( void );
0089 PSID WorldSid        ( void );
0090 PSID InteractiveSid  ( void );
0091 PSID NetworkSid      ( void );
0092 PSID LocalSid        ( void );
0093 PSID DialupSid       ( void );
0094 PSID BatchSid        ( void );
0095 PSID CreatorOwnerSid ( void );
0096 PSID NullSid         ( void );
0097 PSID NtSid           ( void );
0098 
0099 PVOID AllocAccessAllowedAce ( DWORD, BYTE, PSID );
0100 void  FreeAce ( PVOID );
0101 
0102 BOOL MoveDirectory   ( LPCWSTR, LPCWSTR );
0103 BOOL CopyDirectory   ( LPCWSTR, LPCWSTR );
0104 
0105 void SetMoveDirectoryProc     ( MOVE_DIR_PROC     );
0106 void SetCopyDirectoryProc     ( COPY_DIR_PROC     );
0107 void SetResponseDirectoryProc ( RESPONSE_DIR_PROC );
0108 
0109 # ifdef __cplusplus
0110 }
0111 # endif  /* __cplusplus */
0112 
0113 #endif