1 // Copyright (c) 1998-1999 Matra Datavision
2 // Copyright (c) 1999-2012 OPEN CASCADE SAS
4 // The content of this file is subject to the Open CASCADE Technology Public
5 // License Version 6.5 (the "License"). You may not use the content of this file
6 // except in compliance with the License. Please obtain a copy of the License
7 // at http://www.opencascade.org and read it completely before using this file.
9 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12 // The Original Code and all software distributed under the License is
13 // distributed on an "AS IS" basis, without warranty of any kind, and the
14 // Initial Developer hereby disclaims all such warranties, including without
15 // limitation, any warranties of merchantability, fitness for a particular
16 // purpose or non-infringement. Please see the License for the specific terms
17 // and conditions governing the rights and limitations under the License.
28 # endif /* _INC_WINDOWS */
32 # endif /* _INC_TCHAR */
35 # if !defined(HAVE_NO_DLL)
37 # define OSDAPI __declspec( dllexport )
39 # define OSDAPI __declspec( dllimport )
46 #if defined(__CYGWIN32__) || defined(__MINGW32__)
52 # endif /* __cplusplus */
54 enum DIR_RESPONSE { DIR_ABORT, DIR_RETRY, DIR_IGNORE };
56 enum MB_ITEMTYPE { MBT_BUTTON, MBT_ICON };
58 #define FLAG_READ_PIPE 0x00000001
59 #define FLAG_EOF 0x00000002
60 #define FLAG_FILE 0x00000004
61 #define FLAG_DIRECTORY 0x00000008
62 #define FLAG_PIPE 0x00000010
63 #define FLAG_SOCKET 0x00000020
64 #define FLAG_NAMED_PIPE 0x00000040
65 #define FLAG_DEVICE 0x00000080
66 #define FLAG_TYPE 0x0000007C
68 // 2 macros modified for VisualAge
69 //#define LODWORD( a ) ( DWORD )( ( ( DWORDLONG )( a ) ) & 0x00000000FFFFFFFF )
70 //#define HIDWORD( a ) ( DWORD )( ( ( DWORDLONG )( a ) ) >> 32 )
72 #define LODWORD( a ) ( DWORD )( ( ( _int64 )( a ) ) & 0x00000000FFFFFFFF )
73 #define HIDWORD( a ) ( DWORD )( ( ( _int64 )( a ) ) >> 32 )
75 typedef struct _group_sid {
80 } GROUP_SID, *PGROUP_SID;
82 typedef struct _MB_DESC {
88 } MB_DESC, *LPMB_DESC;
91 typedef struct _file_ace {
97 } FILE_ACE, *PFILE_ACE;
99 typedef void ( *MOVE_DIR_PROC ) ( LPCTSTR, LPCTSTR );
100 typedef void ( *COPY_DIR_PROC ) ( LPCTSTR, LPCTSTR );
101 typedef void ( *DELETE_DIR_PROC ) ( LPCTSTR );
103 typedef DIR_RESPONSE ( *RESPONSE_DIR_PROC ) ( LPCTSTR );
105 #define GET_SID( pACE ) ( ( PSID )( ( ( PBYTE )pACE ) + \
106 sizeof ( ACE_HEADER ) + \
111 #define GET_MSK( pACE ) ( ( PDWORD )( ( ( PBYTE )pACE ) + \
112 sizeof ( ACE_HEADER ) \
116 PSECURITY_DESCRIPTOR OSDAPI AllocSD ( void );
117 void OSDAPI FreeSD ( PSECURITY_DESCRIPTOR );
119 LPVOID OSDAPI GetTokenInformationEx ( HANDLE, TOKEN_INFORMATION_CLASS );
120 void OSDAPI FreeTokenInformation ( LPVOID );
122 PSECURITY_DESCRIPTOR OSDAPI GetFileSecurityEx ( LPCTSTR, SECURITY_INFORMATION );
123 void OSDAPI FreeFileSecurity ( PSECURITY_DESCRIPTOR );
125 BOOL OSDAPI LookupAccountSidEx ( PSID, LPTSTR*, LPTSTR* );
126 void OSDAPI FreeAccountNames ( LPTSTR, LPTSTR );
128 PSID OSDAPI GetSecurityDescriptorOwnerEx ( PSECURITY_DESCRIPTOR );
129 PSID OSDAPI GetSecurityDescriptorGroupEx ( PSECURITY_DESCRIPTOR );
130 PACL OSDAPI GetSecurityDescriptorDaclEx ( PSECURITY_DESCRIPTOR );
132 PACL OSDAPI CreateAcl ( DWORD );
133 void OSDAPI FreeAcl ( PACL );
135 BOOL OSDAPI PredefinedSid ( PSID );
136 BOOL OSDAPI NtPredefinedSid ( PSID );
137 PSID OSDAPI AdminSid ( void );
138 PSID OSDAPI WorldSid ( void );
139 PSID OSDAPI InteractiveSid ( void );
140 PSID OSDAPI NetworkSid ( void );
141 PSID OSDAPI LocalSid ( void );
142 PSID OSDAPI DialupSid ( void );
143 PSID OSDAPI BatchSid ( void );
144 PSID OSDAPI CreatorOwnerSid ( void );
145 PSID OSDAPI NullSid ( void );
146 PSID OSDAPI NtSid ( void );
148 PSID OSDAPI CopySidEx ( PSID );
149 void OSDAPI FreeSidEx ( PSID );
151 PGROUP_SID OSDAPI AllocGroupSid ( PSECURITY_DESCRIPTOR );
152 void OSDAPI FreeGroupSid ( PGROUP_SID );
154 PVOID OSDAPI AllocAccessAllowedAce ( DWORD, BYTE, PSID );
155 void OSDAPI FreeAce ( PVOID );
157 BOOL OSDAPI DeleteDirectory ( LPCTSTR );
158 BOOL OSDAPI MoveDirectory ( LPCTSTR, LPCTSTR );
159 BOOL OSDAPI CopyDirectory ( LPCTSTR, LPCTSTR );
161 void OSDAPI SetDeleteDirectoryProc ( DELETE_DIR_PROC );
162 void OSDAPI SetMoveDirectoryProc ( MOVE_DIR_PROC );
163 void OSDAPI SetCopyDirectoryProc ( COPY_DIR_PROC );
164 void OSDAPI SetResponseDirectoryProc ( RESPONSE_DIR_PROC );
166 BOOL OSDAPI DirWalk ( LPCTSTR, LPCTSTR, BOOL ( * ) ( LPCTSTR, BOOL, void* ), BOOL, void* );
168 _TINT OSDAPI MsgBox ( HWND, LPTSTR, LPCTSTR, _TINT, LPMB_DESC );
170 void OSDAPI WNT_InitTimer ( void );
171 LPCTSTR OSDAPI WNT_StatTimer ( void );
173 void OSDAPI _debug_break ( LPTSTR );
177 # endif /* __cplusplus */
179 #endif /* __OSD_WNT_H */