Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-13 09:17:34

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 {
0029 #endif /* __cplusplus */
0030 
0031   enum DIR_RESPONSE
0032   {
0033     DIR_ABORT,
0034     DIR_RETRY,
0035     DIR_IGNORE
0036   };
0037 
0038 #define FLAG_READ_PIPE 0x00000001
0039 #define FLAG_EOF 0x00000002
0040 #define FLAG_FILE 0x00000004
0041 #define FLAG_DIRECTORY 0x00000008
0042 #define FLAG_PIPE 0x00000010
0043 #define FLAG_SOCKET 0x00000020
0044 #define FLAG_NAMED_PIPE 0x00000040
0045 #define FLAG_DEVICE 0x00000080
0046 #define FLAG_TYPE 0x0000007C
0047 
0048   // 2 macros modified for VisualAge
0049   // #define LODWORD( a ) ( DWORD )(   ( ( DWORDLONG )( a ) ) & 0x00000000FFFFFFFF   )
0050   // #define HIDWORD( a ) ( DWORD )(   ( ( DWORDLONG )( a ) ) >> 32                  )
0051 
0052 #define LODWORD(a) (DWORD)(((_int64)(a)) & 0x00000000FFFFFFFF)
0053 #define HIDWORD(a) (DWORD)(((_int64)(a)) >> 32)
0054 
0055   typedef struct _file_ace
0056   {
0057 
0058     ACE_HEADER header;
0059     DWORD      dwMask;
0060     PSID       pSID;
0061 
0062   } FILE_ACE, *PFILE_ACE;
0063 
0064   typedef void (*MOVE_DIR_PROC)(LPCWSTR, LPCWSTR);
0065   typedef void (*COPY_DIR_PROC)(LPCWSTR, LPCWSTR);
0066   typedef void (*DELETE_DIR_PROC)(LPCWSTR);
0067 
0068   typedef DIR_RESPONSE (*RESPONSE_DIR_PROC)(LPCWSTR);
0069 
0070 #define GET_SID(pACE) ((PSID)(((PBYTE)pACE) + sizeof(ACE_HEADER) + sizeof(DWORD)))
0071 
0072 #define GET_MSK(pACE) ((PDWORD)(((PBYTE)pACE) + sizeof(ACE_HEADER)))
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