1 /* 2 * PROJECT: ReactOS Setup Library 3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) 4 * PURPOSE: Device utility functions 5 * COPYRIGHT: Copyright 2024 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> 6 */ 7 8 #pragma once 9 10 /* Flags combination allowing all the read, write and delete share modes. 11 * Currently similar to FILE_SHARE_VALID_FLAGS. */ 12 #define FILE_SHARE_ALL \ 13 (FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE) 14 15 /* FUNCTIONS *****************************************************************/ 16 17 NTSTATUS 18 pOpenDeviceEx_UStr( 19 _In_ PCUNICODE_STRING DevicePath, 20 _Out_ PHANDLE DeviceHandle, 21 _In_ ACCESS_MASK DesiredAccess, 22 _In_ ULONG ShareAccess); 23 24 NTSTATUS 25 pOpenDevice_UStr( 26 _In_ PCUNICODE_STRING DevicePath, 27 _Out_ PHANDLE DeviceHandle); 28 29 NTSTATUS 30 pOpenDeviceEx( 31 _In_ PCWSTR DevicePath, 32 _Out_ PHANDLE DeviceHandle, 33 _In_ ACCESS_MASK DesiredAccess, 34 _In_ ULONG ShareAccess); 35 36 NTSTATUS 37 pOpenDevice( 38 _In_ PCWSTR DevicePath, 39 _Out_ PHANDLE DeviceHandle); 40 41 /* EOF */ 42