@@ -143,7 +143,6 @@ pub const WSAECONNREFUSED: c_int = 10061;
143
143
144
144
pub const MAX_PROTOCOL_CHAIN : DWORD = 7 ;
145
145
146
- pub const TOKEN_READ : DWORD = 0x20008 ;
147
146
pub const MAXIMUM_REPARSE_DATA_BUFFER_SIZE : usize = 16 * 1024 ;
148
147
pub const FSCTL_GET_REPARSE_POINT : DWORD = 0x900a8 ;
149
148
pub const IO_REPARSE_TAG_SYMLINK : DWORD = 0xa000000c ;
@@ -660,10 +659,19 @@ cfg_if::cfg_if! {
660
659
if #[ cfg( not( target_vendor = "uwp" ) ) ] {
661
660
pub const HANDLE_FLAG_INHERIT : DWORD = 0x00000001 ;
662
661
662
+ pub const TOKEN_READ : DWORD = 0x20008 ;
663
+
663
664
extern "system" {
664
665
#[ link_name = "SystemFunction036" ]
665
666
pub fn RtlGenRandom ( RandomBuffer : * mut u8 , RandomBufferLength : ULONG ) -> BOOLEAN ;
666
667
668
+ // Allowed but unused by UWP
669
+ pub fn OpenProcessToken ( ProcessHandle : HANDLE ,
670
+ DesiredAccess : DWORD ,
671
+ TokenHandle : * mut HANDLE ) -> BOOL ;
672
+ pub fn GetUserProfileDirectoryW ( hToken: HANDLE ,
673
+ lpProfileDir: LPWSTR ,
674
+ lpcchSize: * mut DWORD ) -> BOOL ;
667
675
pub fn SetHandleInformation ( hObject: HANDLE ,
668
676
dwMask: DWORD ,
669
677
dwFlags: DWORD ) -> BOOL ;
@@ -752,9 +760,6 @@ extern "system" {
752
760
pub fn GetCommandLineW ( ) -> * mut LPCWSTR ;
753
761
pub fn GetTempPathW ( nBufferLength : DWORD ,
754
762
lpBuffer : LPCWSTR ) -> DWORD ;
755
- pub fn OpenProcessToken ( ProcessHandle : HANDLE ,
756
- DesiredAccess : DWORD ,
757
- TokenHandle : * mut HANDLE ) -> BOOL ;
758
763
pub fn GetCurrentProcess ( ) -> HANDLE ;
759
764
pub fn GetCurrentThread ( ) -> HANDLE ;
760
765
pub fn GetStdHandle ( which : DWORD ) -> HANDLE ;
@@ -779,9 +784,6 @@ extern "system" {
779
784
pub fn SwitchToThread ( ) -> BOOL ;
780
785
pub fn Sleep ( dwMilliseconds : DWORD ) ;
781
786
pub fn GetProcessId ( handle : HANDLE ) -> DWORD ;
782
- pub fn GetUserProfileDirectoryW ( hToken : HANDLE ,
783
- lpProfileDir : LPWSTR ,
784
- lpcchSize : * mut DWORD ) -> BOOL ;
785
787
pub fn CopyFileExW ( lpExistingFileName : LPCWSTR ,
786
788
lpNewFileName : LPCWSTR ,
787
789
lpProgressRoutine : LPPROGRESS_ROUTINE ,
0 commit comments