Changeset 49150 in vbox
- Timestamp:
- Oct 17, 2013 7:22:02 AM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 90010
- Location:
- trunk
- Files:
-
- 1 added
- 7 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/nt/nt.h
r49147 r49150 1 1 /* $Id$ */ 2 2 /** @file 3 * IPRT - Internal Header for the Native NT code.3 * IPRT - Header for code using the Native NT API. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 2010-201 2Oracle Corporation7 * Copyright (C) 2010-2013 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 25 25 */ 26 26 27 #ifndef ___iprt_nt_nt_h___ 28 #define ___iprt_nt_nt_h___ 27 29 28 #ifndef ___internal_r3_nt_h___29 #define ___internal_r3_nt_h___30 31 32 /*******************************************************************************33 * Header Files *34 *******************************************************************************/35 30 #include <ntstatus.h> 36 31 #ifdef IPRT_NT_USE_WINTERNL … … 39 34 # include <winnt.h> 40 35 # include <winternl.h> 36 # undef WIN32_NO_STATUS 37 # include <ntstatus.h> 41 38 # define IPRT_NT_NEED_API_GROUP_1 42 39 … … 48 45 # include <ntifs.h> 49 46 #endif 50 #include "internal/iprt.h"47 #include <iprt/types.h> 51 48 52 49 53 /******************************************************************************* 54 * Defined Constants And Macros * 55 *******************************************************************************/ 50 /** @name Useful macros 51 * @{ */ 56 52 /** Indicates that we're targetting native NT in the current source. */ 57 #define RT _USE_NATIVE_NT153 #define RTNT_USE_NATIVE_NT 1 58 54 /** Initializes a IO_STATUS_BLOCK. */ 59 #define MY_IO_STATUS_BLOCK_INITIALIZER { STATUS_FAILED_DRIVER_ENTRY, ~(uintptr_t)42 }55 #define RTNT_IO_STATUS_BLOCK_INITIALIZER { STATUS_FAILED_DRIVER_ENTRY, ~(uintptr_t)42 } 60 56 /** Similar to INVALID_HANDLE_VALUE in the Windows environment. */ 61 #define MY_INVALID_HANDLE_VALUE ( (HANDLE)~(uintptr_t)0 ) 62 63 #ifdef DEBUG_bird 64 /** Enables the "\\!\" NT path pass thru as well as hacks for listing NT object 65 * directories. */ 66 # define IPRT_WITH_NT_PATH_PASSTHRU 1 67 #endif 57 #define RTNT_INVALID_HANDLE_VALUE ( (HANDLE)~(uintptr_t)0 ) 58 /** @} */ 68 59 69 60 70 /******************************************************************************* 71 * Internal Functions * 72 *******************************************************************************/ 73 int rtNtPathOpen(const char *pszPath, ACCESS_MASK fDesiredAccess, ULONG fFileAttribs, ULONG fShareAccess, 74 ULONG fCreateDisposition, ULONG fCreateOptions, ULONG fObjAttribs, 75 PHANDLE phHandle, PULONG_PTR puDisposition); 76 int rtNtPathOpenDir(const char *pszPath, ACCESS_MASK fDesiredAccess, ULONG fShareAccess, ULONG fCreateOptions, 61 /** @name IPRT helper functions for NT 62 * @{ */ 63 RT_C_DECLS_BEGIN 64 65 RTDECL(int) RTNtPathOpen(const char *pszPath, ACCESS_MASK fDesiredAccess, ULONG fFileAttribs, ULONG fShareAccess, 66 ULONG fCreateDisposition, ULONG fCreateOptions, ULONG fObjAttribs, 67 PHANDLE phHandle, PULONG_PTR puDisposition); 68 RTDECL(int) RTNtPathOpenDir(const char *pszPath, ACCESS_MASK fDesiredAccess, ULONG fShareAccess, ULONG fCreateOptions, 77 69 ULONG fObjAttribs, PHANDLE phHandle, bool *pfObjDir); 78 int rtNtPathClose(HANDLE hHandle); 70 RTDECL(int) RTNtPathClose(HANDLE hHandle); 71 72 RT_C_DECLS_END 73 /** @} */ 79 74 80 75 81 /** 82 * Internal helper for comparing a WCHAR string with a char string. 83 * 84 * @returns @c true if equal, @c false if not. 85 * @param pwsz1 The first string. 86 * @param cb1 The length of the first string, in bytes. 87 * @param psz2 The second string. 88 * @param cch2 The length of the second string. 89 */ 90 DECLINLINE(bool) rtNtCompWideStrAndAscii(WCHAR const *pwsz1, size_t cch1, const char *psz2, size_t cch2) 91 { 92 if (cch1 != cch2 * 2) 93 return false; 94 while (cch2-- > 0) 95 { 96 unsigned ch1 = *pwsz1++; 97 unsigned ch2 = (unsigned char)*psz2++; 98 if (ch1 != ch2) 99 return false; 100 } 101 return true; 102 } 103 104 105 /******************************************************************************* 106 * NT APIs * 107 *******************************************************************************/ 108 76 /** @name NT API delcarations. 77 * @{ */ 109 78 RT_C_DECLS_BEGIN 110 79 … … 119 88 } FILE_FS_ATTRIBUTE_INFORMATION; 120 89 typedef FILE_FS_ATTRIBUTE_INFORMATION *PFILE_FS_ATTRIBUTE_INFORMATION; 90 91 typedef enum 92 { 93 FileFsVolumeInformation = 1, 94 FileFsLabelInformation, 95 FileFsSizeInformation, 96 FileFsDeviceInformation, 97 FileFsAttributeInformation, 98 FileFsControlInformation, 99 FileFsFullSizeInformation, 100 FileFsObjectIdInformation, 101 FileFsMaximumInformation 102 } FS_INFORMATION_CLASS; 103 typedef FS_INFORMATION_CLASS *PFS_INFORMATION_CLASS; 121 104 extern "C" NTSTATUS NTAPI NtQueryVolumeInformationFile(HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG, FS_INFORMATION_CLASS); 122 105 … … 134 117 NTSTATUS NTAPI NtQueryDirectoryObject(HANDLE, PVOID, ULONG, BOOLEAN, BOOLEAN, PULONG, PULONG); 135 118 136 137 119 RT_C_DECLS_END 120 /** @} */ 138 121 139 122 #endif -
trunk/src/VBox/HostDrivers/Support/win/SUPLib-win.cpp
r44528 r49150 38 38 #endif 39 39 40 #include <Windows.h> 40 #define USE_NT_DEVICE_IO_CONTROL_FILE 41 #ifdef USE_NT_DEVICE_IO_CONTROL_FILE 42 # include <iprt/nt/nt-and-windows.h> 43 #else 44 # include <Windows.h> 45 #endif 41 46 42 47 #include <VBox/sup.h> … … 75 80 static int suplibOsStartService(void); 76 81 static int suplibOsStopService(void); 82 #ifdef USE_NT_DEVICE_IO_CONTROL_FILE 83 static int suplibConvertNtStatus(NTSTATUS rcNt); 84 #else 77 85 static int suplibConvertWin32Err(int); 86 #endif 78 87 79 88 … … 496 505 PSUPREQHDR pHdr = (PSUPREQHDR)pvReq; 497 506 Assert(cbReq == RT_MAX(pHdr->cbIn, pHdr->cbOut)); 507 # ifdef USE_NT_DEVICE_IO_CONTROL_FILE 508 IO_STATUS_BLOCK Ios; 509 Ios.Status = -1; 510 Ios.Information = 0; 511 NTSTATUS rcNt = NtDeviceIoControlFile((HANDLE)pThis->hDevice, NULL /*hEvent*/, NULL /*pfnApc*/, NULL /*pvApcCtx*/, &Ios, 512 (ULONG)uFunction, 513 pvReq /*pvInput */, pHdr->cbIn /* cbInput */, 514 pvReq /*pvOutput*/, pHdr->cbOut /* cbOutput */); 515 if (NT_SUCCESS(rcNt)) 516 { 517 if (NT_SUCCESS(Ios.Status)) 518 return VINF_SUCCESS; 519 rcNt = Ios.Status; 520 } 521 return suplibConvertNtStatus(rcNt); 522 523 # else 498 524 DWORD cbReturned = (ULONG)pHdr->cbOut; 499 525 if (DeviceIoControl((HANDLE)pThis->hDevice, uFunction, pvReq, pHdr->cbIn, pvReq, cbReturned, &cbReturned, NULL)) 500 526 return 0; 501 527 return suplibConvertWin32Err(GetLastError()); 528 # endif 502 529 } 503 530 … … 508 535 * Issue device I/O control. 509 536 */ 537 # ifdef USE_NT_DEVICE_IO_CONTROL_FILE 538 IO_STATUS_BLOCK Ios; 539 Ios.Status = -1; 540 Ios.Information = 0; 541 NTSTATUS rcNt = NtDeviceIoControlFile((HANDLE)pThis->hDevice, NULL /*hEvent*/, NULL /*pfnApc*/, NULL /*pvApcCtx*/, &Ios, 542 (ULONG)uFunction, 543 (PVOID)idCpu /*pvInput */, 0 /* cbInput */, 544 NULL /*pvOutput*/, 0 /* cbOutput */); 545 if (NT_SUCCESS(rcNt)) 546 { 547 if (NT_SUCCESS(Ios.Status)) 548 return VINF_SUCCESS; 549 rcNt = Ios.Status; 550 } 551 return suplibConvertNtStatus(rcNt); 552 # else 510 553 DWORD cbReturned = 0; 511 554 if (DeviceIoControl((HANDLE)pThis->hDevice, uFunction, NULL, 0, (LPVOID)idCpu, 0, &cbReturned, NULL)) 512 555 return VINF_SUCCESS; 513 556 return suplibConvertWin32Err(GetLastError()); 557 # endif 514 558 } 515 559 … … 521 565 if (*ppvPages) 522 566 return VINF_SUCCESS; 523 return suplibConvertWin32Err(GetLastError());567 return RTErrConvertFromWin32(GetLastError()); 524 568 } 525 569 … … 530 574 if (VirtualFree(pvPages, 0, MEM_RELEASE)) 531 575 return VINF_SUCCESS; 532 return suplibConvertWin32Err(GetLastError()); 533 } 534 535 576 return RTErrConvertFromWin32(GetLastError()); 577 } 578 579 580 # ifndef USE_NT_DEVICE_IO_CONTROL_FILE 536 581 /** 537 582 * Converts a supdrv win32 error code to an IPRT status code. … … 585 630 return RTErrConvertFromWin32(rc); 586 631 } 632 # else 633 /** 634 * Reverse of VBoxDrvNtErr2NtStatus 635 * returns VBox status code. 636 * @param rcNt NT status code. 637 */ 638 static int suplibConvertNtStatus(NTSTATUS rcNt) 639 { 640 switch (rcNt) 641 { 642 case STATUS_SUCCESS: return VINF_SUCCESS; 643 case STATUS_NOT_SUPPORTED: return VERR_GENERAL_FAILURE; 644 case STATUS_INVALID_PARAMETER: return VERR_INVALID_PARAMETER; 645 case STATUS_UNKNOWN_REVISION: return VERR_INVALID_MAGIC; 646 case STATUS_INVALID_HANDLE: return VERR_INVALID_HANDLE; 647 case STATUS_INVALID_ADDRESS: return VERR_INVALID_POINTER; 648 case STATUS_NOT_LOCKED: return VERR_LOCK_FAILED; 649 case STATUS_IMAGE_ALREADY_LOADED: return VERR_ALREADY_LOADED; 650 case STATUS_ACCESS_DENIED: return VERR_PERMISSION_DENIED; 651 case STATUS_REVISION_MISMATCH: return VERR_VERSION_MISMATCH; 652 } 653 654 /* Fall back on IPRT for the rest. */ 655 return RTErrConvertFromNtStatus(rcNt); 656 } 657 # endif 587 658 588 659 #endif /* !IN_SUP_HARDENED_R3 */ -
trunk/src/VBox/Runtime/include/internal/dir.h
r47535 r49150 91 91 /** Handle to the opened directory search. */ 92 92 HANDLE hDir; 93 # ifndef RT _USE_NATIVE_NT93 # ifndef RTNT_USE_NATIVE_NT 94 94 /** Find data buffer. 95 95 * fDataUnread indicates valid data. */ -
trunk/src/VBox/Runtime/r3/nt/direnum-r3-nt.cpp
r48935 r49150 105 105 bool fObjDir; 106 106 #endif 107 rc = rtNtPathOpenDir(pszPathBuf,107 rc = RTNtPathOpenDir(pszPathBuf, 108 108 FILE_READ_DATA | SYNCHRONIZE, 109 109 FILE_SHARE_READ | FILE_SHARE_WRITE, … … 149 149 */ 150 150 pDir->u32Magic = ~RTDIR_MAGIC; 151 if (pDir->hDir != MY_INVALID_HANDLE_VALUE)152 { 153 int rc = rtNtPathClose(pDir->hDir);151 if (pDir->hDir != RTNT_INVALID_HANDLE_VALUE) 152 { 153 int rc = RTNtPathClose(pDir->hDir); 154 154 AssertRC(rc); 155 pDir->hDir = MY_INVALID_HANDLE_VALUE;155 pDir->hDir = RTNT_INVALID_HANDLE_VALUE; 156 156 } 157 157 RTStrFree(pDir->pszName); … … 281 281 */ 282 282 NTSTATUS rcNt; 283 IO_STATUS_BLOCK Ios = MY_IO_STATUS_BLOCK_INITIALIZER;283 IO_STATUS_BLOCK Ios = RTNT_IO_STATUS_BLOCK_INITIALIZER; 284 284 if (pThis->enmInfoClass != (FILE_INFORMATION_CLASS)0) 285 285 { -
trunk/src/VBox/Runtime/r3/nt/fs-nt.cpp
r48935 r49150 53 53 */ 54 54 HANDLE hFile; 55 int rc = rtNtPathOpen(pszFsPath,55 int rc = RTNtPathOpen(pszFsPath, 56 56 GENERIC_READ, 57 57 FILE_ATTRIBUTE_NORMAL, … … 68 68 */ 69 69 FILE_FS_SIZE_INFORMATION FsSizeInfo; 70 IO_STATUS_BLOCK Ios = MY_IO_STATUS_BLOCK_INITIALIZER;70 IO_STATUS_BLOCK Ios = RTNT_IO_STATUS_BLOCK_INITIALIZER; 71 71 NTSTATUS rcNt = NtQueryVolumeInformationFile(hFile, &Ios, &FsSizeInfo, sizeof(FsSizeInfo), FileFsSizeInformation); 72 72 if (NT_SUCCESS(rcNt)) … … 108 108 rc = RTErrConvertFromNtStatus(rcNt); 109 109 110 rtNtPathClose(hFile);110 RTNtPathClose(hFile); 111 111 } 112 112 return rc; … … 126 126 */ 127 127 HANDLE hFile; 128 int rc = rtNtPathOpen(pszFsPath,128 int rc = RTNtPathOpen(pszFsPath, 129 129 GENERIC_READ, 130 130 FILE_ATTRIBUTE_NORMAL, … … 145 145 uint8_t abBuf[sizeof(FILE_FS_VOLUME_INFORMATION) + 4096]; 146 146 } u; 147 IO_STATUS_BLOCK Ios = MY_IO_STATUS_BLOCK_INITIALIZER;147 IO_STATUS_BLOCK Ios = RTNT_IO_STATUS_BLOCK_INITIALIZER; 148 148 NTSTATUS rcNt = NtQueryVolumeInformationFile(hFile, &Ios, &u, sizeof(u), FileFsVolumeInformation); 149 149 if (NT_SUCCESS(rcNt)) … … 152 152 rc = RTErrConvertFromNtStatus(rcNt); 153 153 154 rtNtPathClose(hFile);154 RTNtPathClose(hFile); 155 155 } 156 156 return rc; … … 170 170 */ 171 171 HANDLE hFile; 172 int rc = rtNtPathOpen(pszFsPath,172 int rc = RTNtPathOpen(pszFsPath, 173 173 GENERIC_READ, 174 174 FILE_ATTRIBUTE_NORMAL, … … 189 189 uint8_t abBuf[sizeof(FILE_FS_ATTRIBUTE_INFORMATION) + 4096]; 190 190 } u; 191 IO_STATUS_BLOCK Ios = MY_IO_STATUS_BLOCK_INITIALIZER;191 IO_STATUS_BLOCK Ios = RTNT_IO_STATUS_BLOCK_INITIALIZER; 192 192 NTSTATUS rcNt = NtQueryVolumeInformationFile(hFile, &Ios, &u, sizeof(u), FileFsAttributeInformation); 193 193 if (NT_SUCCESS(rcNt)) … … 220 220 rc = RTErrConvertFromNtStatus(rcNt); 221 221 222 rtNtPathClose(hFile);222 RTNtPathClose(hFile); 223 223 } 224 224 return rc; … … 240 240 */ 241 241 HANDLE hFile; 242 int rc = rtNtPathOpen(pszFsPath,242 int rc = RTNtPathOpen(pszFsPath, 243 243 GENERIC_READ, 244 244 FILE_ATTRIBUTE_NORMAL, … … 259 259 uint8_t abBuf[sizeof(FILE_FS_ATTRIBUTE_INFORMATION) + 4096]; 260 260 } u; 261 IO_STATUS_BLOCK Ios = MY_IO_STATUS_BLOCK_INITIALIZER;261 IO_STATUS_BLOCK Ios = RTNT_IO_STATUS_BLOCK_INITIALIZER; 262 262 NTSTATUS rcNt = NtQueryVolumeInformationFile(hFile, &Ios, &u, sizeof(u), FileFsAttributeInformation); 263 263 if (NT_SUCCESS(rcNt)) … … 278 278 rc = RTErrConvertFromNtStatus(rcNt); 279 279 280 rtNtPathClose(hFile);281 } 282 return rc; 283 } 284 280 RTNtPathClose(hFile); 281 } 282 return rc; 283 } 284 -
trunk/src/VBox/Runtime/r3/nt/internal-r3-nt.h
r47535 r49150 5 5 6 6 /* 7 * Copyright (C) 2010-201 2Oracle Corporation7 * Copyright (C) 2010-2013 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 30 30 31 31 32 /******************************************************************************* 33 * Header Files * 34 *******************************************************************************/ 35 #include <ntstatus.h> 36 #ifdef IPRT_NT_USE_WINTERNL 37 # define WIN32_NO_STATUS 38 # include <windef.h> 39 # include <winnt.h> 40 # include <winternl.h> 41 # define IPRT_NT_NEED_API_GROUP_1 42 43 #elif defined(IPRT_NT_USE_WDM) 44 # include <wdm.h> 45 # define IPRT_NT_NEED_API_GROUP_1 46 47 #else 48 # include <ntifs.h> 49 #endif 32 #include <iprt/nt/nt.h> 50 33 #include "internal/iprt.h" 51 34 52 53 /*******************************************************************************54 * Defined Constants And Macros *55 *******************************************************************************/56 /** Indicates that we're targetting native NT in the current source. */57 #define RT_USE_NATIVE_NT 158 /** Initializes a IO_STATUS_BLOCK. */59 #define MY_IO_STATUS_BLOCK_INITIALIZER { STATUS_FAILED_DRIVER_ENTRY, ~(uintptr_t)42 }60 /** Similar to INVALID_HANDLE_VALUE in the Windows environment. */61 #define MY_INVALID_HANDLE_VALUE ( (HANDLE)~(uintptr_t)0 )62 35 63 36 #ifdef DEBUG_bird … … 66 39 # define IPRT_WITH_NT_PATH_PASSTHRU 1 67 40 #endif 68 69 70 /*******************************************************************************71 * Internal Functions *72 *******************************************************************************/73 int rtNtPathOpen(const char *pszPath, ACCESS_MASK fDesiredAccess, ULONG fFileAttribs, ULONG fShareAccess,74 ULONG fCreateDisposition, ULONG fCreateOptions, ULONG fObjAttribs,75 PHANDLE phHandle, PULONG_PTR puDisposition);76 int rtNtPathOpenDir(const char *pszPath, ACCESS_MASK fDesiredAccess, ULONG fShareAccess, ULONG fCreateOptions,77 ULONG fObjAttribs, PHANDLE phHandle, bool *pfObjDir);78 int rtNtPathClose(HANDLE hHandle);79 41 80 42 … … 102 64 } 103 65 104 105 /*******************************************************************************106 * NT APIs *107 *******************************************************************************/108 109 RT_C_DECLS_BEGIN110 111 #ifdef IPRT_NT_NEED_API_GROUP_1112 113 typedef struct _FILE_FS_ATTRIBUTE_INFORMATION114 {115 ULONG FileSystemAttributes;116 LONG MaximumComponentNameLength;117 ULONG FileSystemNameLength;118 WCHAR FileSystemName[1];119 } FILE_FS_ATTRIBUTE_INFORMATION;120 typedef FILE_FS_ATTRIBUTE_INFORMATION *PFILE_FS_ATTRIBUTE_INFORMATION;121 extern "C" NTSTATUS NTAPI NtQueryVolumeInformationFile(HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG, FS_INFORMATION_CLASS);122 123 66 #endif 124 67 125 NTSTATUS NTAPI NtOpenDirectoryObject(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES);126 127 typedef struct _OBJECT_DIRECTORY_INFORMATION128 {129 UNICODE_STRING Name;130 UNICODE_STRING TypeName;131 } OBJECT_DIRECTORY_INFORMATION;132 typedef OBJECT_DIRECTORY_INFORMATION *POBJECT_DIRECTORY_INFORMATION;133 134 NTSTATUS NTAPI NtQueryDirectoryObject(HANDLE, PVOID, ULONG, BOOLEAN, BOOLEAN, PULONG, PULONG);135 136 137 RT_C_DECLS_END138 139 #endif140 -
trunk/src/VBox/Runtime/r3/nt/pathint-nt.cpp
r47535 r49150 203 203 * @param puAction Where to return the action taken. Optional. 204 204 */ 205 int rtNtPathOpen(const char *pszPath, ACCESS_MASK fDesiredAccess, ULONG fFileAttribs, ULONG fShareAccess,206 ULONG fCreateDisposition, ULONG fCreateOptions, ULONG fObjAttribs,207 PHANDLE phHandle, PULONG_PTR puAction)208 { 209 *phHandle = MY_INVALID_HANDLE_VALUE;205 RTDECL(int) RTNtPathOpen(const char *pszPath, ACCESS_MASK fDesiredAccess, ULONG fFileAttribs, ULONG fShareAccess, 206 ULONG fCreateDisposition, ULONG fCreateOptions, ULONG fObjAttribs, 207 PHANDLE phHandle, PULONG_PTR puAction) 208 { 209 *phHandle = RTNT_INVALID_HANDLE_VALUE; 210 210 211 211 HANDLE hRootDir; … … 214 214 if (RT_SUCCESS(rc)) 215 215 { 216 HANDLE hFile = MY_INVALID_HANDLE_VALUE;217 IO_STATUS_BLOCK Ios = MY_IO_STATUS_BLOCK_INITIALIZER;216 HANDLE hFile = RTNT_INVALID_HANDLE_VALUE; 217 IO_STATUS_BLOCK Ios = RTNT_IO_STATUS_BLOCK_INITIALIZER; 218 218 OBJECT_ATTRIBUTES ObjAttr; 219 219 InitializeObjectAttributes(&ObjAttr, &NtName, fObjAttribs, hRootDir, NULL); … … 263 263 * directory). 264 264 */ 265 int rtNtPathOpenDir(const char *pszPath, ACCESS_MASK fDesiredAccess, ULONG fShareAccess, ULONG fCreateOptions,266 ULONG fObjAttribs, PHANDLE phHandle, bool *pfObjDir)267 { 268 *phHandle = MY_INVALID_HANDLE_VALUE;265 RTDECL(int) RTNtPathOpenDir(const char *pszPath, ACCESS_MASK fDesiredAccess, ULONG fShareAccess, ULONG fCreateOptions, 266 ULONG fObjAttribs, PHANDLE phHandle, bool *pfObjDir) 267 { 268 *phHandle = RTNT_INVALID_HANDLE_VALUE; 269 269 270 270 HANDLE hRootDir; … … 273 273 if (RT_SUCCESS(rc)) 274 274 { 275 HANDLE hFile = MY_INVALID_HANDLE_VALUE;276 IO_STATUS_BLOCK Ios = MY_IO_STATUS_BLOCK_INITIALIZER;275 HANDLE hFile = RTNT_INVALID_HANDLE_VALUE; 276 IO_STATUS_BLOCK Ios = RTNT_IO_STATUS_BLOCK_INITIALIZER; 277 277 OBJECT_ATTRIBUTES ObjAttr; 278 278 InitializeObjectAttributes(&ObjAttr, &NtName, fObjAttribs, hRootDir, NULL); … … 347 347 * @param hHandle The handle value. 348 348 */ 349 int rtNtPathClose(HANDLE hHandle)349 RTDECL(int) RTNtPathClose(HANDLE hHandle) 350 350 { 351 351 NTSTATUS rcNt = NtClose(hHandle); -
trunk/src/VBox/Runtime/r3/win/ntdll-mini-implib.c
r47535 r49150 172 172 } 173 173 174 NTSYSAPI NTSTATUS NTAPI NtDeviceIoControlFile(HANDLE FileHandle, HANDLE Event, PIO_APC_ROUTINE ApcRoutine, PVOID ApcContext, 175 PIO_STATUS_BLOCK IoStatusBlock, ULONG IoControlCode, PVOID InputBuffer, 176 LONG InputBufferLength, PVOID OutputBuffer, ULONG OutputBufferLength) 177 { 178 return -1; 179 } 180
Note:
See TracChangeset
for help on using the changeset viewer.