Changeset 82833 in vbox
- Timestamp:
- Jan 22, 2020 4:22:59 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/nt/nt.h
r80212 r82833 390 390 */ 391 391 RTDECL(int) RTNtPathEnsureSpace(struct _UNICODE_STRING *pNtName, size_t cwcMin); 392 393 /** 394 * Gets the NT path to the object represented by the given handle. 395 * 396 * @returns IPRT status code. 397 * @param pNtName Where to return the NT path. Free using 398 * RTUtf16Alloc. 399 * @param hHandle The handle. 400 * @param cwcExtra How much extra space is needed. 401 */ 402 RTDECL(int) RTNtPathFromHandle(struct _UNICODE_STRING *pNtName, HANDLE hHandle, size_t cwcExtra); 392 403 393 404 /** … … 2749 2760 2750 2761 #endif /* IPRT_NT_USE_WINTERNL */ 2762 2763 /** For use with ObjectBasicInformation. 2764 * A watered down version of this struct appears under the name 2765 * PUBLIC_OBJECT_BASIC_INFORMATION in ntifs.h. It only defines 2766 * the first four members, so don't trust the rest. */ 2767 typedef struct _OBJECT_BASIC_INFORMATION 2768 { 2769 ULONG Attributes; 2770 ACCESS_MASK GrantedAccess; 2771 ULONG HandleCount; 2772 ULONG PointerCount; 2773 /* Not in ntifs.h: */ 2774 ULONG PagedPoolCharge; 2775 ULONG NonPagedPoolCharge; 2776 ULONG Reserved[3]; 2777 ULONG NameInfoSize; 2778 ULONG TypeInfoSize; 2779 ULONG SecurityDescriptorSize; 2780 LARGE_INTEGER CreationTime; 2781 } OBJECT_BASIC_INFORMATION; 2782 typedef OBJECT_BASIC_INFORMATION *POBJECT_BASIC_INFORMATION; 2751 2783 2752 2784 /** For use with ObjectHandleFlagInformation. */ -
trunk/src/VBox/Runtime/r3/nt/pathint-nt.cpp
r78200 r82833 572 572 * @param cwcExtra How much extra space is needed. 573 573 */ 574 static int rtNtPathFromHandle(struct _UNICODE_STRING *pNtName, HANDLE hHandle, size_t cwcExtra)574 RTDECL(int) RTNtPathFromHandle(struct _UNICODE_STRING *pNtName, HANDLE hHandle, size_t cwcExtra) 575 575 { 576 576 /* … … 634 634 { 635 635 RTUtf16Free(pNtName->Buffer); 636 rc = rtNtPathFromHandle(pNtName, *phRootDir, pNtName->Length / sizeof(RTUTF16) + 2);636 rc = RTNtPathFromHandle(pNtName, *phRootDir, pNtName->Length / sizeof(RTUTF16) + 2); 637 637 if (RT_SUCCESS(rc)) 638 638 { … … 646 646 UNICODE_STRING RootDir; 647 647 size_t const cwcAppend = pNtName->Length / sizeof(RTUTF16); 648 rc = rtNtPathFromHandle(&RootDir, *phRootDir, cwcAppend + 2);648 rc = RTNtPathFromHandle(&RootDir, *phRootDir, cwcAppend + 2); 649 649 if (RT_SUCCESS(rc)) 650 650 { … … 802 802 { 803 803 RTUtf16Free(pwszDst); 804 rc = rtNtPathFromHandle(pNtName, *phRootDir, cwcMax + 2);804 rc = RTNtPathFromHandle(pNtName, *phRootDir, cwcMax + 2); 805 805 if (RT_FAILURE(rc)) 806 806 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.