Changeset 73097 in vbox for trunk/src/VBox/Runtime/r3/win
- Timestamp:
- Jul 12, 2018 9:06:33 PM (7 years ago)
- Location:
- trunk/src/VBox/Runtime/r3/win
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/win/RTSystemShutdown-win.cpp
r70615 r73097 76 76 FALSE /*DisableAllPrivileges*/, 77 77 &u.TokenPriv, 78 RT_ OFFSETOF(TOKEN_PRIVILEGES, Privileges[1]),78 RT_UOFFSETOF(TOKEN_PRIVILEGES, Privileges[1]), 79 79 NULL, 80 80 NULL) ) -
trunk/src/VBox/Runtime/r3/win/direnum-win.cpp
r69753 r73097 161 161 if (cbDirEntry < RT_UOFFSETOF(RTDIRENTRY, szName[2])) 162 162 { 163 AssertMsgFailed(("Invalid *pcbDirEntry=% d (min %d)\n", *pcbDirEntry, RT_OFFSETOF(RTDIRENTRY, szName[2])));163 AssertMsgFailed(("Invalid *pcbDirEntry=%zu (min %zu)\n", *pcbDirEntry, RT_UOFFSETOF(RTDIRENTRY, szName[2]))); 164 164 return VERR_INVALID_PARAMETER; 165 165 } … … 203 203 const char *pszName = pDir->pszName; 204 204 const size_t cchName = pDir->cchName; 205 const size_t cbRequired = RT_ OFFSETOF(RTDIRENTRY, szName[1]) + cchName;205 const size_t cbRequired = RT_UOFFSETOF(RTDIRENTRY, szName[1]) + cchName; 206 206 if (pcbDirEntry) 207 207 *pcbDirEntry = cbRequired; … … 255 255 if (cbDirEntry < RT_UOFFSETOF(RTDIRENTRYEX, szName[2])) 256 256 { 257 AssertMsgFailed(("Invalid *pcbDirEntry=% d (min %d)\n", *pcbDirEntry, RT_OFFSETOF(RTDIRENTRYEX, szName[2])));257 AssertMsgFailed(("Invalid *pcbDirEntry=%zu (min %zu)\n", *pcbDirEntry, RT_UOFFSETOF(RTDIRENTRYEX, szName[2]))); 258 258 return VERR_INVALID_PARAMETER; 259 259 } … … 297 297 const char *pszName = pDir->pszName; 298 298 const size_t cchName = pDir->cchName; 299 const size_t cbRequired = RT_ OFFSETOF(RTDIRENTRYEX, szName[1]) + cchName;299 const size_t cbRequired = RT_UOFFSETOF(RTDIRENTRYEX, szName[1]) + cchName; 300 300 if (pcbDirEntry) 301 301 *pcbDirEntry = cbRequired; -
trunk/src/VBox/Runtime/r3/win/fileaio-win.cpp
r69111 r73097 122 122 #define AIO_CONTEXT_WAKEUP_EVENT 1 123 123 /** Converts a pointer to an OVERLAPPED structure to a internal request. */ 124 #define OVERLAPPED_2_RTFILEAIOREQINTERNAL(pOverlapped) ( (PRTFILEAIOREQINTERNAL)((uintptr_t)(pOverlapped) - RT_ OFFSETOF(RTFILEAIOREQINTERNAL, Overlapped)) )124 #define OVERLAPPED_2_RTFILEAIOREQINTERNAL(pOverlapped) ( (PRTFILEAIOREQINTERNAL)((uintptr_t)(pOverlapped) - RT_UOFFSETOF(RTFILEAIOREQINTERNAL, Overlapped)) ) 125 125 126 126 RTR3DECL(int) RTFileAioGetLimits(PRTFILEAIOLIMITS pAioLimits) -
trunk/src/VBox/Runtime/r3/win/krnlmod-win.cpp
r69434 r73097 95 95 if (NT_SUCCESS(rcNt) || rcNt == STATUS_INFO_LENGTH_MISMATCH) 96 96 { 97 ULONG cbKrnlMods = RT_ OFFSETOF(RTL_PROCESS_MODULES, Modules[KrnlModsSize.NumberOfModules]);97 ULONG cbKrnlMods = RT_UOFFSETOF_DYN(RTL_PROCESS_MODULES, Modules[KrnlModsSize.NumberOfModules]); 98 98 PRTL_PROCESS_MODULES pKrnlMods = (PRTL_PROCESS_MODULES)RTMemAllocZ(cbKrnlMods); 99 99 if (RT_LIKELY(pKrnlMods)) … … 127 127 RT_NOREF2(pModInfo, phKrnlModInfo); 128 128 size_t cchFilePath = strlen((const char *)&pModInfo->FullPathName[0]) + 1; 129 PRTKRNLMODINFOINT pThis = (PRTKRNLMODINFOINT)RTMemAllocZ(RT_ OFFSETOF(RTKRNLMODINFOINT, achFilePath[cchFilePath]));129 PRTKRNLMODINFOINT pThis = (PRTKRNLMODINFOINT)RTMemAllocZ(RT_UOFFSETOF_DYN(RTKRNLMODINFOINT, achFilePath[cchFilePath])); 130 130 if (RT_LIKELY(pThis)) 131 131 { -
trunk/src/VBox/Runtime/r3/win/localipc-win.cpp
r69536 r73097 401 401 * Allocate and initialize the instance data. 402 402 */ 403 size_t cbThis = RT_ OFFSETOF(RTLOCALIPCSERVERINT, wszName[cwcFullName + 1]);403 size_t cbThis = RT_UOFFSETOF_DYN(RTLOCALIPCSERVERINT, wszName[cwcFullName + 1]); 404 404 PRTLOCALIPCSERVERINT pThis = (PRTLOCALIPCSERVERINT)RTMemAllocVar(cbThis); 405 405 AssertReturn(pThis, VERR_NO_MEMORY); -
trunk/src/VBox/Runtime/r3/win/process-win.cpp
r70486 r73097 831 831 uOld = uNew; 832 832 SetLastError(NO_ERROR); 833 DWORD cbActual = RT_ OFFSETOF(TOKEN_PRIVILEGES, Privileges[1]);833 DWORD cbActual = RT_UOFFSETOF(TOKEN_PRIVILEGES, Privileges[1]); 834 834 AdjustTokenPrivileges(hToken, FALSE /*fDisableAllPrivileges*/, &uNew.TokPriv, cbActual, &uOld.TokPriv, &cbActual); 835 835 if (GetLastError() != NO_ERROR) … … 1124 1124 } AceBuf; 1125 1125 RT_ZERO(AceBuf); 1126 uint32_t const cbAllowedAce = RT_ OFFSETOF(ACCESS_ALLOWED_ACE, SidStart) + cbSid;1126 uint32_t const cbAllowedAce = RT_UOFFSETOF(ACCESS_ALLOWED_ACE, SidStart) + cbSid; 1127 1127 AssertReturn(cbAllowedAce <= sizeof(AceBuf), false); 1128 1128 … … 1848 1848 SIZE_T cbCopied = 0; 1849 1849 if (!ReadProcessMemory(hDstProcess, 1850 (char *)BasicInfo.PebBaseAddress + RT_ OFFSETOF(PEB_COMMON, ProcessParameters),1850 (char *)BasicInfo.PebBaseAddress + RT_UOFFSETOF(PEB_COMMON, ProcessParameters), 1851 1851 ppvDstProcParamCache, sizeof(*ppvDstProcParamCache), &cbCopied)) 1852 1852 { … … 2006 2006 PVOID pvDstProcParamCache = NULL; 2007 2007 rtProcWinDupStdHandleIntoChild(pStartupInfo->hStdInput, pProcInfo->hProcess, 2008 RT_ OFFSETOF(RTL_USER_PROCESS_PARAMETERS, StandardInput), &pvDstProcParamCache);2008 RT_UOFFSETOF(RTL_USER_PROCESS_PARAMETERS, StandardInput), &pvDstProcParamCache); 2009 2009 rtProcWinDupStdHandleIntoChild(pStartupInfo->hStdOutput, pProcInfo->hProcess, 2010 RT_ OFFSETOF(RTL_USER_PROCESS_PARAMETERS, StandardOutput), &pvDstProcParamCache);2010 RT_UOFFSETOF(RTL_USER_PROCESS_PARAMETERS, StandardOutput), &pvDstProcParamCache); 2011 2011 rtProcWinDupStdHandleIntoChild(pStartupInfo->hStdError, pProcInfo->hProcess, 2012 RT_ OFFSETOF(RTL_USER_PROCESS_PARAMETERS, StandardError), &pvDstProcParamCache);2012 RT_UOFFSETOF(RTL_USER_PROCESS_PARAMETERS, StandardError), &pvDstProcParamCache); 2013 2013 2014 2014 if (ResumeThread(pProcInfo->hThread) != ~(DWORD)0)
Note:
See TracChangeset
for help on using the changeset viewer.