1 | /** @file
|
---|
2 | *
|
---|
3 | * VirtualBox Windows Guest Shared Folders
|
---|
4 | *
|
---|
5 | * File System Driver helpers
|
---|
6 | */
|
---|
7 |
|
---|
8 | /*
|
---|
9 | * Copyright (C) 2012 Oracle Corporation
|
---|
10 | *
|
---|
11 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
12 | * available from http://www.virtualbox.org. This file is free software;
|
---|
13 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
14 | * General Public License (GPL) as published by the Free Software
|
---|
15 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
16 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
17 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
18 | */
|
---|
19 | #ifndef __VBSFHLP__H
|
---|
20 | #define __VBSFHLP__H
|
---|
21 |
|
---|
22 | #include <ntifs.h>
|
---|
23 | #include <ntverp.h>
|
---|
24 |
|
---|
25 | #include "VBoxGuestR0LibSharedFolders.h"
|
---|
26 |
|
---|
27 | void vbsfHlpSleep (ULONG ulMillies);
|
---|
28 | NTSTATUS vbsfHlpCreateDriveLetter (WCHAR Letter, UNICODE_STRING *pDeviceName);
|
---|
29 | NTSTATUS vbsfHlpDeleteDriveLetter (WCHAR Letter);
|
---|
30 |
|
---|
31 | /**
|
---|
32 | * Convert VBox IRT file attributes to NT file attributes
|
---|
33 | *
|
---|
34 | * @returns NT file attributes
|
---|
35 | * @param fMode IRT file attributes
|
---|
36 | *
|
---|
37 | */
|
---|
38 | uint32_t VBoxToNTFileAttributes (uint32_t fMode);
|
---|
39 |
|
---|
40 | /**
|
---|
41 | * Convert VBox IRT file attributes to NT file attributes
|
---|
42 | *
|
---|
43 | * @returns NT file attributes
|
---|
44 | * @param fMode IRT file attributes
|
---|
45 | *
|
---|
46 | */
|
---|
47 | uint32_t NTToVBoxFileAttributes (uint32_t fMode);
|
---|
48 |
|
---|
49 | /**
|
---|
50 | * Convert VBox error code to NT status code
|
---|
51 | *
|
---|
52 | * @returns NT status code
|
---|
53 | * @param vboxRC VBox error code
|
---|
54 | *
|
---|
55 | */
|
---|
56 | NTSTATUS VBoxErrorToNTStatus (int vboxRC);
|
---|
57 |
|
---|
58 | PVOID vbsfAllocNonPagedMem (ULONG ulSize);
|
---|
59 | void vbsfFreeNonPagedMem (PVOID lpMem);
|
---|
60 |
|
---|
61 | #if defined(DEBUG) || defined (LOG_ENABLED)
|
---|
62 | PCHAR MajorFunctionString(UCHAR MajorFunction, LONG MinorFunction);
|
---|
63 | #endif
|
---|
64 |
|
---|
65 | #endif /* __VBSFHLP__H */
|
---|