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