0022651: Impossible to build OCC as static library due to using Standard_EXPORT inste...
[occt.git] / src / OSD / OSD_WNT.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
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
27extern "C" {
28# endif /* __cplusplus */
29
30enum 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
49typedef struct _file_ace {
50
51 ACE_HEADER header;
52 DWORD dwMask;
53 PSID pSID;
54
55 } FILE_ACE, *PFILE_ACE;
56
57typedef void ( *MOVE_DIR_PROC ) ( LPCWSTR, LPCWSTR );
58typedef void ( *COPY_DIR_PROC ) ( LPCWSTR, LPCWSTR );
59typedef void ( *DELETE_DIR_PROC ) ( LPCWSTR );
60
61typedef 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
74PSECURITY_DESCRIPTOR AllocSD ( void );
75void FreeSD ( PSECURITY_DESCRIPTOR );
76
77LPVOID GetTokenInformationEx ( HANDLE, TOKEN_INFORMATION_CLASS );
78void FreeTokenInformation ( LPVOID );
79
80PSECURITY_DESCRIPTOR GetFileSecurityEx ( LPCWSTR, SECURITY_INFORMATION );
81void FreeFileSecurity ( PSECURITY_DESCRIPTOR );
82
83PACL CreateAcl ( DWORD );
84void FreeAcl ( PACL );
85
86BOOL PredefinedSid ( PSID );
87BOOL NtPredefinedSid ( PSID );
88PSID AdminSid ( void );
89PSID WorldSid ( void );
90PSID InteractiveSid ( void );
91PSID NetworkSid ( void );
92PSID LocalSid ( void );
93PSID DialupSid ( void );
94PSID BatchSid ( void );
95PSID CreatorOwnerSid ( void );
96PSID NullSid ( void );
97PSID NtSid ( void );
98
99PVOID AllocAccessAllowedAce ( DWORD, BYTE, PSID );
100void FreeAce ( PVOID );
101
102BOOL MoveDirectory ( LPCWSTR, LPCWSTR );
103BOOL CopyDirectory ( LPCWSTR, LPCWSTR );
104
105void SetMoveDirectoryProc ( MOVE_DIR_PROC );
106void SetCopyDirectoryProc ( COPY_DIR_PROC );
107void SetResponseDirectoryProc ( RESPONSE_DIR_PROC );
108
109# ifdef __cplusplus
110}
111# endif /* __cplusplus */
112
113#endif /* __OSD_WNT_H */