Commit 399901e0 authored by Ge van Geldorp's avatar Ge van Geldorp Committed by Alexandre Julliard

Rename LARGE_INTEGER and ULARGE_INTEGER members "s" to "u" to conform

with PSDK.
parent 0bd5b378
......@@ -127,8 +127,8 @@ HRESULT WINAPI IDirect3D8Impl_GetAdapterIdentifier (LPDIRECT3D8 iface,
if (Adapter == 0) { /* Display */
strcpy(pIdentifier->Driver, "Display");
strcpy(pIdentifier->Description, "Direct3D Display");
pIdentifier->DriverVersion.s.HighPart = 1;
pIdentifier->DriverVersion.s.LowPart = 0;
pIdentifier->DriverVersion.u.HighPart = 1;
pIdentifier->DriverVersion.u.LowPart = 0;
pIdentifier->VendorId = 0;
pIdentifier->DeviceId = 0;
pIdentifier->SubSysId = 0;
......
......@@ -136,10 +136,10 @@ HRESULT WINAPI ILoaderStream_IStream_Seek (LPSTREAM iface, LARGE_INTEGER dlibMov
if (This->hFile == INVALID_HANDLE_VALUE) return E_FAIL;
liNewPos.s.HighPart = dlibMove.s.HighPart;
liNewPos.s.LowPart = SetFilePointer (This->hFile, dlibMove.s.LowPart, &liNewPos.s.HighPart, dwOrigin);
liNewPos.u.HighPart = dlibMove.u.HighPart;
liNewPos.u.LowPart = SetFilePointer (This->hFile, dlibMove.u.LowPart, &liNewPos.u.HighPart, dwOrigin);
if (liNewPos.s.LowPart == INVALID_SET_FILE_POINTER && GetLastError() != NO_ERROR) return E_FAIL;
if (liNewPos.u.LowPart == INVALID_SET_FILE_POINTER && GetLastError() != NO_ERROR) return E_FAIL;
if (plibNewPosition) plibNewPosition->QuadPart = liNewPos.QuadPart;
return S_OK;
......
......@@ -187,7 +187,7 @@ BOOL WINAPI QueryPerformanceCounter(PLARGE_INTEGER counter)
if (IsProcessorFeaturePresent( PF_RDTSC_INSTRUCTION_AVAILABLE )) {
/* i586 optimized version */
__asm__ __volatile__ ( "rdtsc"
: "=a" (counter->s.LowPart), "=d" (counter->s.HighPart) );
: "=a" (counter->u.LowPart), "=d" (counter->u.HighPart) );
counter->QuadPart = counter->QuadPart / 1000; /* see below */
return TRUE;
}
......@@ -226,8 +226,8 @@ BOOL WINAPI QueryPerformanceFrequency(PLARGE_INTEGER frequency)
return TRUE;
}
#endif
frequency->s.LowPart = 1000000;
frequency->s.HighPart = 0;
frequency->u.LowPart = 1000000;
frequency->u.HighPart = 0;
return TRUE;
}
......
......@@ -338,8 +338,8 @@ BOOL WINAPI GetFileSizeEx( HANDLE hFile, PLARGE_INTEGER lpFileSize )
return FALSE;
}
lpFileSize->s.LowPart = info.nFileSizeLow;
lpFileSize->s.HighPart = info.nFileSizeHigh;
lpFileSize->u.LowPart = info.nFileSizeLow;
lpFileSize->u.HighPart = info.nFileSizeHigh;
return TRUE;
}
......@@ -357,10 +357,10 @@ BOOL WINAPI LockFile( HANDLE hFile, DWORD offset_low, DWORD offset_high,
TRACE( "%p %lx%08lx %lx%08lx\n",
hFile, offset_high, offset_low, count_high, count_low );
count.s.LowPart = count_low;
count.s.HighPart = count_high;
offset.s.LowPart = offset_low;
offset.s.HighPart = offset_high;
count.u.LowPart = count_low;
count.u.HighPart = count_high;
offset.u.LowPart = offset_low;
offset.u.HighPart = offset_high;
status = NtLockFile( hFile, 0, NULL, NULL,
NULL, &offset, &count, NULL, TRUE, TRUE );
......@@ -398,10 +398,10 @@ BOOL WINAPI LockFileEx( HANDLE hFile, DWORD flags, DWORD reserved,
hFile, overlapped->OffsetHigh, overlapped->Offset,
count_high, count_low, flags );
count.s.LowPart = count_low;
count.s.HighPart = count_high;
offset.s.LowPart = overlapped->Offset;
offset.s.HighPart = overlapped->OffsetHigh;
count.u.LowPart = count_low;
count.u.HighPart = count_high;
offset.u.LowPart = overlapped->Offset;
offset.u.HighPart = overlapped->OffsetHigh;
status = NtLockFile( hFile, overlapped->hEvent, NULL, NULL,
NULL, &offset, &count, NULL,
......@@ -422,10 +422,10 @@ BOOL WINAPI UnlockFile( HANDLE hFile, DWORD offset_low, DWORD offset_high,
NTSTATUS status;
LARGE_INTEGER count, offset;
count.s.LowPart = count_low;
count.s.HighPart = count_high;
offset.s.LowPart = offset_low;
offset.s.HighPart = offset_high;
count.u.LowPart = count_low;
count.u.HighPart = count_high;
offset.u.LowPart = offset_low;
offset.u.HighPart = offset_high;
status = NtUnlockFile( hFile, NULL, &offset, &count, NULL);
if (status) SetLastError( RtlNtStatusToDosError(status) );
......
......@@ -79,7 +79,7 @@ static DWORD CALLBACK SYSTEM_TimerThread( void *dummy )
if (!(SYS_timer = CreateWaitableTimerA( NULL, FALSE, NULL ))) return 0;
when.s.LowPart = when.s.HighPart = 0;
when.u.LowPart = when.u.HighPart = 0;
SetWaitableTimer( SYS_timer, &when, (SYS_TIMER_RATE+500)/1000, SYSTEM_TimerTick, 0, FALSE );
for (;;) SleepEx( INFINITE, TRUE );
}
......
......@@ -69,8 +69,8 @@ BOOL WINAPI SetLocalTime(
NTSTATUS status;
SystemTimeToFileTime( systime, &ft );
st.s.LowPart = ft.dwLowDateTime;
st.s.HighPart = ft.dwHighDateTime;
st.u.LowPart = ft.dwLowDateTime;
st.u.HighPart = ft.dwHighDateTime;
RtlLocalTimeToSystemTime( &st, &st2 );
if ((status = NtSetSystemTime(&st2, NULL)))
......@@ -121,8 +121,8 @@ BOOL WINAPI SetSystemTime(
NTSTATUS status;
SystemTimeToFileTime( systime, &ft );
t.s.LowPart = ft.dwLowDateTime;
t.s.HighPart = ft.dwHighDateTime;
t.u.LowPart = ft.dwLowDateTime;
t.u.HighPart = ft.dwHighDateTime;
if ((status = NtSetSystemTime(&t, NULL)))
SetLastError( RtlNtStatusToDosError(status) );
return !status;
......@@ -472,8 +472,8 @@ VOID WINAPI GetSystemTimeAsFileTime(
{
LARGE_INTEGER t;
NtQuerySystemTime( &t );
time->dwLowDateTime = t.s.LowPart;
time->dwHighDateTime = t.s.HighPart;
time->dwLowDateTime = t.u.LowPart;
time->dwHighDateTime = t.u.HighPart;
}
......@@ -728,12 +728,12 @@ BOOL WINAPI LocalFileTimeToFileTime( const FILETIME *localft, LPFILETIME utcft )
NTSTATUS status;
LARGE_INTEGER local, utc;
local.s.LowPart = localft->dwLowDateTime;
local.s.HighPart = localft->dwHighDateTime;
local.u.LowPart = localft->dwLowDateTime;
local.u.HighPart = localft->dwHighDateTime;
if (!(status = RtlLocalTimeToSystemTime( &local, &utc )))
{
utcft->dwLowDateTime = utc.s.LowPart;
utcft->dwHighDateTime = utc.s.HighPart;
utcft->dwLowDateTime = utc.u.LowPart;
utcft->dwHighDateTime = utc.u.HighPart;
}
else SetLastError( RtlNtStatusToDosError(status) );
......@@ -748,12 +748,12 @@ BOOL WINAPI FileTimeToLocalFileTime( const FILETIME *utcft, LPFILETIME localft )
NTSTATUS status;
LARGE_INTEGER local, utc;
utc.s.LowPart = utcft->dwLowDateTime;
utc.s.HighPart = utcft->dwHighDateTime;
utc.u.LowPart = utcft->dwLowDateTime;
utc.u.HighPart = utcft->dwHighDateTime;
if (!(status = RtlSystemTimeToLocalTime( &utc, &local )))
{
localft->dwLowDateTime = local.s.LowPart;
localft->dwHighDateTime = local.s.HighPart;
localft->dwLowDateTime = local.u.LowPart;
localft->dwHighDateTime = local.u.HighPart;
}
else SetLastError( RtlNtStatusToDosError(status) );
......@@ -768,8 +768,8 @@ BOOL WINAPI FileTimeToSystemTime( const FILETIME *ft, LPSYSTEMTIME syst )
TIME_FIELDS tf;
LARGE_INTEGER t;
t.s.LowPart = ft->dwLowDateTime;
t.s.HighPart = ft->dwHighDateTime;
t.u.LowPart = ft->dwLowDateTime;
t.u.HighPart = ft->dwHighDateTime;
RtlTimeToTimeFields(&t, &tf);
syst->wYear = tf.Year;
......@@ -800,8 +800,8 @@ BOOL WINAPI SystemTimeToFileTime( const SYSTEMTIME *syst, LPFILETIME ft )
tf.Milliseconds = syst->wMilliseconds;
RtlTimeFieldsToTime(&tf, &t);
ft->dwLowDateTime = t.s.LowPart;
ft->dwHighDateTime = t.s.HighPart;
ft->dwLowDateTime = t.u.LowPart;
ft->dwHighDateTime = t.u.HighPart;
return TRUE;
}
......@@ -848,8 +848,8 @@ VOID WINAPI GetLocalTime(LPSYSTEMTIME systime) /* [O] Destination for current ti
NtQuerySystemTime(&ft);
RtlSystemTimeToLocalTime(&ft, &ft2);
lft.dwLowDateTime = ft2.s.LowPart;
lft.dwHighDateTime = ft2.s.HighPart;
lft.dwLowDateTime = ft2.u.LowPart;
lft.dwHighDateTime = ft2.u.HighPart;
FileTimeToSystemTime(&lft, systime);
}
......@@ -867,7 +867,7 @@ VOID WINAPI GetSystemTime(LPSYSTEMTIME systime) /* [O] Destination for current t
LARGE_INTEGER t;
NtQuerySystemTime(&t);
ft.dwLowDateTime = t.s.LowPart;
ft.dwHighDateTime = t.s.HighPart;
ft.dwLowDateTime = t.u.LowPart;
ft.dwHighDateTime = t.u.HighPart;
FileTimeToSystemTime(&ft, systime);
}
......@@ -343,8 +343,8 @@ HANDLE WINAPI CreateFileMappingW( HANDLE hFile, LPSECURITY_ATTRIBUTES sa,
}
}
size.s.LowPart = size_low;
size.s.HighPart = size_high;
size.u.LowPart = size_low;
size.u.HighPart = size_high;
status = NtCreateSection( &ret, access, &attr, &size, protect, sec_type, hFile );
SetLastError( RtlNtStatusToDosError(status) );
......@@ -453,8 +453,8 @@ LPVOID WINAPI MapViewOfFileEx(
LARGE_INTEGER offset;
ULONG protect;
offset.s.LowPart = offset_low;
offset.s.HighPart = offset_high;
offset.u.LowPart = offset_low;
offset.u.HighPart = offset_high;
if (access & FILE_MAP_WRITE) protect = PAGE_READWRITE;
else if (access & FILE_MAP_READ) protect = PAGE_READONLY;
......
......@@ -686,8 +686,8 @@ static NTSTATUS CDROM_GetDriveGeometry(int dev, DISK_GEOMETRY* dg)
fsize = FRAME_OF_TOC(toc, toc.LastTrack+1)
- FRAME_OF_TOC(toc, 1); /* Total size in frames */
dg->Cylinders.s.LowPart = fsize / (64 * 32);
dg->Cylinders.s.HighPart = 0;
dg->Cylinders.u.LowPart = fsize / (64 * 32);
dg->Cylinders.u.HighPart = 0;
dg->MediaType = RemovableMedia;
dg->TracksPerCylinder = 64;
dg->SectorsPerTrack = 32;
......@@ -1318,8 +1318,8 @@ static NTSTATUS CDROM_RawRead(int dev, const RAW_READ_INFO* raw, void* buffer, D
switch (raw->TrackMode)
{
case YellowMode2:
if (raw->DiskOffset.s.HighPart) FIXME("Unsupported value\n");
cdr.cdread_lba = raw->DiskOffset.s.LowPart; /* FIXME ? */
if (raw->DiskOffset.u.HighPart) FIXME("Unsupported value\n");
cdr.cdread_lba = raw->DiskOffset.u.LowPart; /* FIXME ? */
cdr.cdread_bufaddr = buffer;
cdr.cdread_buflen = raw->SectorCount * sectSize;
io = ioctl(cdrom_cache[dev].fd, CDROMREADMODE2, &cdr);
......@@ -1336,9 +1336,9 @@ static NTSTATUS CDROM_RawRead(int dev, const RAW_READ_INFO* raw, void* buffer, D
* talking of 0.2 ms of sound
*/
/* 2048 = 2 ** 11 */
if (raw->DiskOffset.s.HighPart & ~2047) FIXME("Unsupported value\n");
cdra.addr.lba = ((raw->DiskOffset.s.LowPart >> 11) |
(raw->DiskOffset.s.HighPart << (32 - 11))) - 1;
if (raw->DiskOffset.u.HighPart & ~2047) FIXME("Unsupported value\n");
cdra.addr.lba = ((raw->DiskOffset.u.LowPart >> 11) |
(raw->DiskOffset.u.HighPart << (32 - 11))) - 1;
FIXME("reading at %u\n", cdra.addr.lba);
cdra.addr_format = CDROM_LBA;
cdra.nframes = raw->SectorCount;
......
......@@ -377,8 +377,8 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
ovp->offset = 0;
else
{
ovp->offset = offset->s.LowPart;
if (offset->s.HighPart) FIXME("NIY-high part\n");
ovp->offset = offset->u.LowPart;
if (offset->u.HighPart) FIXME("NIY-high part\n");
}
ovp->apc = apc;
ovp->apc_user = apc_user;
......@@ -399,7 +399,7 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
LARGE_INTEGER timeout;
/* let some APC be run, this will read some already pending data */
timeout.s.LowPart = timeout.s.HighPart = 0;
timeout.u.LowPart = timeout.u.HighPart = 0;
NtDelayExecution( TRUE, &timeout );
}
return io_status->u.Status;
......@@ -559,8 +559,8 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent,
ovp->async.iosb = io_status;
ovp->count = length;
if (offset) {
ovp->offset = offset->s.LowPart;
if (offset->s.HighPart) FIXME("NIY-high part\n");
ovp->offset = offset->u.LowPart;
if (offset->u.HighPart) FIXME("NIY-high part\n");
} else {
ovp->offset = 0;
}
......@@ -583,7 +583,7 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent,
LARGE_INTEGER timeout;
/* let some APC be run, this will write as much data as possible */
timeout.s.LowPart = timeout.s.HighPart = 0;
timeout.u.LowPart = timeout.u.HighPart = 0;
NtDelayExecution( TRUE, &timeout );
}
return io_status->u.Status;
......@@ -833,10 +833,10 @@ NTSTATUS WINAPI NtQueryInformationFile(HANDLE hFile, PIO_STATUS_BLOCK io_status,
if ((reply->type == FILE_TYPE_DISK) ||
(reply->type == FILE_TYPE_REMOTE))
{
fsi->AllocationSize.s.HighPart = reply->alloc_high;
fsi->AllocationSize.s.LowPart = reply->alloc_low;
fsi->EndOfFile.s.HighPart = reply->size_high;
fsi->EndOfFile.s.LowPart = reply->size_low;
fsi->AllocationSize.u.HighPart = reply->alloc_high;
fsi->AllocationSize.u.LowPart = reply->alloc_low;
fsi->EndOfFile.u.HighPart = reply->size_high;
fsi->EndOfFile.u.LowPart = reply->size_low;
fsi->NumberOfLinks = reply->links;
fsi->DeletePending = FALSE; /* FIXME */
fsi->Directory = (reply->attr & FILE_ATTRIBUTE_DIRECTORY);
......@@ -861,8 +861,8 @@ NTSTATUS WINAPI NtQueryInformationFile(HANDLE hFile, PIO_STATUS_BLOCK io_status,
req->whence = SEEK_CUR;
if (!(status = wine_server_call( req )))
{
fpi->CurrentByteOffset.s.HighPart = reply->new_high;
fpi->CurrentByteOffset.s.LowPart = reply->new_low;
fpi->CurrentByteOffset.u.HighPart = reply->new_high;
fpi->CurrentByteOffset.u.LowPart = reply->new_low;
used = sizeof(*fpi);
}
}
......@@ -917,8 +917,8 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE hFile, PIO_STATUS_BLOCK io_status,
SERVER_START_REQ( set_file_pointer )
{
req->handle = hFile;
req->low = fpi->CurrentByteOffset.s.LowPart;
req->high = fpi->CurrentByteOffset.s.HighPart;
req->low = fpi->CurrentByteOffset.u.LowPart;
req->high = fpi->CurrentByteOffset.u.HighPart;
req->whence = SEEK_SET;
status = wine_server_call( req );
}
......@@ -1125,10 +1125,10 @@ NTSTATUS WINAPI NtLockFile( HANDLE hFile, HANDLE lock_granted_event,
SERVER_START_REQ( lock_file )
{
req->handle = hFile;
req->offset_low = offset->s.LowPart;
req->offset_high = offset->s.HighPart;
req->count_low = count->s.LowPart;
req->count_high = count->s.HighPart;
req->offset_low = offset->u.LowPart;
req->offset_high = offset->u.HighPart;
req->count_low = count->u.LowPart;
req->count_high = count->u.HighPart;
req->shared = !exclusive;
req->wait = !dont_wait;
ret = wine_server_call( req );
......@@ -1178,7 +1178,7 @@ NTSTATUS WINAPI NtUnlockFile( HANDLE hFile, PIO_STATUS_BLOCK io_status,
NTSTATUS status;
TRACE( "%p %lx%08lx %lx%08lx\n",
hFile, offset->s.HighPart, offset->s.LowPart, count->s.HighPart, count->s.LowPart );
hFile, offset->u.HighPart, offset->u.LowPart, count->u.HighPart, count->u.LowPart );
if (io_status || key)
{
......@@ -1189,10 +1189,10 @@ NTSTATUS WINAPI NtUnlockFile( HANDLE hFile, PIO_STATUS_BLOCK io_status,
SERVER_START_REQ( unlock_file )
{
req->handle = hFile;
req->offset_low = offset->s.LowPart;
req->offset_high = offset->s.HighPart;
req->count_low = count->s.LowPart;
req->count_high = count->s.HighPart;
req->offset_low = offset->u.LowPart;
req->offset_high = offset->u.HighPart;
req->count_low = count->u.LowPart;
req->count_high = count->u.HighPart;
status = wine_server_call( req );
}
SERVER_END_REQ;
......
......@@ -365,7 +365,7 @@ NTSTATUS WINAPI NtSetTimer(IN HANDLE handle,
SERVER_START_REQ( set_timer )
{
if (!when->s.LowPart && !when->s.HighPart)
if (!when->u.LowPart && !when->u.HighPart)
{
/* special case to start timeout on now+period without too many calculations */
req->expire.sec = 0;
......@@ -539,7 +539,7 @@ static void call_apcs( BOOL alertable )
/* convert sec/usec to NT time */
RtlSecondsSince1970ToTime( (time_t)arg1, &time );
time.QuadPart += (DWORD)arg2 * 10;
proc( arg3, time.s.LowPart, time.s.HighPart );
proc( arg3, time.u.LowPart, time.u.HighPart );
break;
case APC_ASYNC_IO:
check_async_list( arg1, (DWORD) arg2 );
......
......@@ -519,7 +519,7 @@ NTSTATUS WINAPI RtlSystemTimeToLocalTime( const LARGE_INTEGER *SystemTime,
*/
BOOLEAN WINAPI RtlTimeToSecondsSince1970( const LARGE_INTEGER *Time, LPDWORD Seconds )
{
ULONGLONG tmp = ((ULONGLONG)Time->s.HighPart << 32) | Time->s.LowPart;
ULONGLONG tmp = ((ULONGLONG)Time->u.HighPart << 32) | Time->u.LowPart;
tmp = RtlLargeIntegerDivide( tmp, 10000000, NULL );
tmp -= SECS_1601_TO_1970;
if (tmp > 0xffffffff) return FALSE;
......@@ -542,7 +542,7 @@ BOOLEAN WINAPI RtlTimeToSecondsSince1970( const LARGE_INTEGER *Time, LPDWORD Sec
*/
BOOLEAN WINAPI RtlTimeToSecondsSince1980( const LARGE_INTEGER *Time, LPDWORD Seconds )
{
ULONGLONG tmp = ((ULONGLONG)Time->s.HighPart << 32) | Time->s.LowPart;
ULONGLONG tmp = ((ULONGLONG)Time->u.HighPart << 32) | Time->u.LowPart;
tmp = RtlLargeIntegerDivide( tmp, 10000000, NULL );
tmp -= SECS_1601_TO_1980;
if (tmp > 0xffffffff) return FALSE;
......@@ -565,8 +565,8 @@ BOOLEAN WINAPI RtlTimeToSecondsSince1980( const LARGE_INTEGER *Time, LPDWORD Sec
void WINAPI RtlSecondsSince1970ToTime( DWORD Seconds, LARGE_INTEGER *Time )
{
ULONGLONG secs = Seconds * (ULONGLONG)TICKSPERSEC + TICKS_1601_TO_1970;
Time->s.LowPart = (DWORD)secs;
Time->s.HighPart = (DWORD)(secs >> 32);
Time->u.LowPart = (DWORD)secs;
Time->u.HighPart = (DWORD)(secs >> 32);
}
/******************************************************************************
......@@ -584,8 +584,8 @@ void WINAPI RtlSecondsSince1970ToTime( DWORD Seconds, LARGE_INTEGER *Time )
void WINAPI RtlSecondsSince1980ToTime( DWORD Seconds, LARGE_INTEGER *Time )
{
ULONGLONG secs = Seconds * (ULONGLONG)TICKSPERSEC + TICKS_1601_TO_1980;
Time->s.LowPart = (DWORD)secs;
Time->s.HighPart = (DWORD)(secs >> 32);
Time->u.LowPart = (DWORD)secs;
Time->u.HighPart = (DWORD)(secs >> 32);
}
/******************************************************************************
......
......@@ -1347,8 +1347,8 @@ NTSTATUS WINAPI NtCreateSection( HANDLE *handle, ACCESS_MASK access, const OBJEC
SERVER_START_REQ( create_mapping )
{
req->file_handle = file;
req->size_high = size ? size->s.HighPart : 0;
req->size_low = size ? size->s.LowPart : 0;
req->size_high = size ? size->u.HighPart : 0;
req->size_low = size ? size->u.LowPart : 0;
req->protect = vprot;
req->access = access;
req->inherit = (attr->Attributes & OBJ_INHERIT) != 0;
......@@ -1410,11 +1410,11 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
}
TRACE("handle=%p addr=%p off=%lx%08lx size=%x access=%lx\n",
handle, *addr_ptr, offset->s.HighPart, offset->s.LowPart, size, protect );
handle, *addr_ptr, offset->u.HighPart, offset->u.LowPart, size, protect );
/* Check parameters */
if ((offset->s.LowPart & granularity_mask) ||
if ((offset->u.LowPart & granularity_mask) ||
(*addr_ptr && ((UINT_PTR)*addr_ptr & granularity_mask)))
return STATUS_INVALID_PARAMETER;
......@@ -1462,14 +1462,14 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
if (size_high)
ERR("Sizes larger than 4Gb not supported\n");
if ((offset->s.LowPart >= size_low) ||
(*size_ptr > size_low - offset->s.LowPart))
if ((offset->u.LowPart >= size_low) ||
(*size_ptr > size_low - offset->u.LowPart))
{
res = STATUS_INVALID_PARAMETER;
goto error;
}
if (*size_ptr) size = ROUND_SIZE( offset->s.LowPart, *size_ptr );
else size = size_low - offset->s.LowPart;
if (*size_ptr) size = ROUND_SIZE( offset->u.LowPart, *size_ptr );
else size = size_low - offset->u.LowPart;
switch(protect)
{
......@@ -1511,14 +1511,14 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
/* Map the file */
TRACE("handle=%p size=%x offset=%lx\n", handle, size, offset->s.LowPart );
TRACE("handle=%p size=%x offset=%lx\n", handle, size, offset->u.LowPart );
ret = VIRTUAL_mmap( unix_handle, ptr, size, offset->s.LowPart, offset->s.HighPart,
ret = VIRTUAL_mmap( unix_handle, ptr, size, offset->u.LowPart, offset->u.HighPart,
VIRTUAL_GetUnixProt( prot ), flags | MAP_FIXED, &removable );
if (ret != ptr)
{
ERR( "VIRTUAL_mmap %p %x %lx%08lx failed\n",
ptr, size, offset->s.HighPart, offset->s.LowPart );
ptr, size, offset->u.HighPart, offset->u.LowPart );
res = STATUS_NO_MEMORY; /* FIXME */
goto error;
}
......
......@@ -287,9 +287,9 @@ HRESULT WINAPI AntiMonikerImpl_GetSizeMax(IMoniker* iface,
/* Normaly the sizemax must be the size of DWORD ! but I tested this function it ususlly return 16 bytes */
/* more than the number of bytes used by AntiMoniker::Save function */
pcbSize->s.LowPart = sizeof(DWORD)+16;
pcbSize->u.LowPart = sizeof(DWORD)+16;
pcbSize->s.HighPart=0;
pcbSize->u.HighPart=0;
return S_OK;
}
......
......@@ -1006,10 +1006,10 @@ _LocalServerThread(LPVOID param) {
hres = IStream_Stat(pStm,&ststg,0);
if (hres) return hres;
buflen = ststg.cbSize.s.LowPart;
buflen = ststg.cbSize.u.LowPart;
buffer = HeapAlloc(GetProcessHeap(),0,buflen);
seekto.s.LowPart = 0;
seekto.s.HighPart = 0;
seekto.u.LowPart = 0;
seekto.u.HighPart = 0;
hres = IStream_Seek(pStm,seekto,SEEK_SET,&newpos);
if (hres) {
FIXME("IStream_Seek failed, %lx\n",hres);
......
......@@ -442,8 +442,8 @@ HRESULT WINAPI CompositeMonikerImpl_GetSizeMax(IMoniker* iface,ULARGE_INTEGER* p
if (pcbSize!=NULL)
return E_POINTER;
pcbSize->s.LowPart =0;
pcbSize->s.HighPart=0;
pcbSize->u.LowPart =0;
pcbSize->u.HighPart=0;
IMoniker_Enum(iface,TRUE,&enumMk);
......@@ -453,8 +453,8 @@ HRESULT WINAPI CompositeMonikerImpl_GetSizeMax(IMoniker* iface,ULARGE_INTEGER* p
IMoniker_Release(pmk);
pcbSize->s.LowPart +=ptmpSize.s.LowPart;
pcbSize->s.HighPart+=ptmpSize.s.HighPart;
pcbSize->u.LowPart +=ptmpSize.u.LowPart;
pcbSize->u.HighPart+=ptmpSize.u.HighPart;
}
IEnumMoniker_Release(enumMk);
......
......@@ -696,7 +696,7 @@ static BOOL DataCache_IsPresentationStream(const STATSTG *elem)
LPCWSTR name = elem->pwcsName;
return (elem->type == STGTY_STREAM)
&& (elem->cbSize.s.LowPart >= sizeof(PresentationDataHeader))
&& (elem->cbSize.u.LowPart >= sizeof(PresentationDataHeader))
&& (strlenW(name) == 11)
&& (strncmpW(name, OlePres, 8) == 0)
&& (name[8] >= '0') && (name[8] <= '9')
......@@ -765,8 +765,8 @@ static HRESULT DataCache_OpenPresStream(
{
/* Rewind the stream before returning it. */
LARGE_INTEGER offset;
offset.s.LowPart = 0;
offset.s.HighPart = 0;
offset.u.LowPart = 0;
offset.u.HighPart = 0;
IStream_Seek(pStm, offset, STREAM_SEEK_SET, NULL);
*ppStm = pStm;
......@@ -835,8 +835,8 @@ static HMETAFILE DataCache_ReadPresMetafile(
/*
* Skip the header
*/
offset.s.HighPart = 0;
offset.s.LowPart = sizeof(PresentationDataHeader);
offset.u.HighPart = 0;
offset.u.LowPart = sizeof(PresentationDataHeader);
hres = IStream_Seek(
presStream,
......@@ -844,14 +844,14 @@ static HMETAFILE DataCache_ReadPresMetafile(
STREAM_SEEK_SET,
NULL);
streamInfo.cbSize.s.LowPart -= offset.s.LowPart;
streamInfo.cbSize.u.LowPart -= offset.u.LowPart;
/*
* Allocate a buffer for the metafile bits.
*/
metafileBits = HeapAlloc(GetProcessHeap(),
0,
streamInfo.cbSize.s.LowPart);
streamInfo.cbSize.u.LowPart);
/*
* Read the metafile bits.
......@@ -859,7 +859,7 @@ static HMETAFILE DataCache_ReadPresMetafile(
hres = IStream_Read(
presStream,
metafileBits,
streamInfo.cbSize.s.LowPart,
streamInfo.cbSize.u.LowPart,
NULL);
/*
......@@ -867,7 +867,7 @@ static HMETAFILE DataCache_ReadPresMetafile(
*/
if (SUCCEEDED(hres))
{
newMetafile = SetMetaFileBitsEx(streamInfo.cbSize.s.LowPart, metafileBits);
newMetafile = SetMetaFileBitsEx(streamInfo.cbSize.u.LowPart, metafileBits);
}
/*
......
......@@ -459,8 +459,8 @@ HRESULT WINAPI FileMonikerImpl_GetSizeMax(IMoniker* iface,
sizeof(WORD)+ /* constant : 0x3 */
len*sizeof(WCHAR); /* unicde filePath string */
pcbSize->s.LowPart=sizeMAx;
pcbSize->s.HighPart=0;
pcbSize->u.LowPart=sizeMAx;
pcbSize->u.HighPart=0;
return S_OK;
}
......
......@@ -309,8 +309,8 @@ HRESULT WINAPI StdGlobalInterfaceTable_GetInterfaceFromGlobal(IGlobalInterfaceTa
}
/* rewind stream, in case it's used again */
move.s.LowPart = 0;
move.s.HighPart = 0;
move.u.LowPart = 0;
move.u.HighPart = 0;
IStream_Seek(entry->stream, move, STREAM_SEEK_SET, NULL);
/* addref it */
......
......@@ -283,14 +283,14 @@ HGLOBALStreamImpl* HGLOBALStreamImpl_Construct(
/*
* Start the stream at the beginning.
*/
newStream->currentPosition.s.HighPart = 0;
newStream->currentPosition.s.LowPart = 0;
newStream->currentPosition.u.HighPart = 0;
newStream->currentPosition.u.LowPart = 0;
/*
* Initialize the size of the stream to the size of the handle.
*/
newStream->streamSize.s.HighPart = 0;
newStream->streamSize.s.LowPart = GlobalSize(newStream->supportHandle);
newStream->streamSize.u.HighPart = 0;
newStream->streamSize.u.LowPart = GlobalSize(newStream->supportHandle);
}
return newStream;
......@@ -446,19 +446,19 @@ HRESULT WINAPI HGLOBALStreamImpl_Read(
* Using the known size of the stream, calculate the number of bytes
* to read from the block chain
*/
bytesToReadFromBuffer = min( This->streamSize.s.LowPart - This->currentPosition.s.LowPart, cb);
bytesToReadFromBuffer = min( This->streamSize.u.LowPart - This->currentPosition.u.LowPart, cb);
/*
* Lock the buffer in position and copy the data.
*/
supportBuffer = GlobalLock(This->supportHandle);
memcpy(pv, (char *) supportBuffer+This->currentPosition.s.LowPart, bytesToReadFromBuffer);
memcpy(pv, (char *) supportBuffer+This->currentPosition.u.LowPart, bytesToReadFromBuffer);
/*
* Move the current position to the new position
*/
This->currentPosition.s.LowPart+=bytesToReadFromBuffer;
This->currentPosition.u.LowPart+=bytesToReadFromBuffer;
/*
* Return the number of bytes read.
......@@ -519,14 +519,14 @@ HRESULT WINAPI HGLOBALStreamImpl_Write(
}
else
{
newSize.s.HighPart = 0;
newSize.s.LowPart = This->currentPosition.s.LowPart + cb;
newSize.u.HighPart = 0;
newSize.u.LowPart = This->currentPosition.u.LowPart + cb;
}
/*
* Verify if we need to grow the stream
*/
if (newSize.s.LowPart > This->streamSize.s.LowPart)
if (newSize.u.LowPart > This->streamSize.u.LowPart)
{
/* grow stream */
IStream_SetSize(iface, newSize);
......@@ -537,12 +537,12 @@ HRESULT WINAPI HGLOBALStreamImpl_Write(
*/
supportBuffer = GlobalLock(This->supportHandle);
memcpy((char *) supportBuffer+This->currentPosition.s.LowPart, pv, cb);
memcpy((char *) supportBuffer+This->currentPosition.u.LowPart, pv, cb);
/*
* Move the current position to the new position
*/
This->currentPosition.s.LowPart+=cb;
This->currentPosition.u.LowPart+=cb;
/*
* Return the number of bytes read.
......@@ -575,8 +575,8 @@ HRESULT WINAPI HGLOBALStreamImpl_Seek(
ULARGE_INTEGER newPosition;
TRACE("(%p, %lx%08lx, %ld, %p)\n", iface, dlibMove.s.HighPart,
dlibMove.s.LowPart, dwOrigin, plibNewPosition);
TRACE("(%p, %lx%08lx, %ld, %p)\n", iface, dlibMove.u.HighPart,
dlibMove.u.LowPart, dwOrigin, plibNewPosition);
/*
* The file pointer is moved depending on the given "function"
......@@ -585,8 +585,8 @@ HRESULT WINAPI HGLOBALStreamImpl_Seek(
switch (dwOrigin)
{
case STREAM_SEEK_SET:
newPosition.s.HighPart = 0;
newPosition.s.LowPart = 0;
newPosition.u.HighPart = 0;
newPosition.u.LowPart = 0;
break;
case STREAM_SEEK_CUR:
newPosition = This->currentPosition;
......@@ -628,27 +628,27 @@ HRESULT WINAPI HGLOBALStreamImpl_SetSize(
HGLOBALStreamImpl* const This=(HGLOBALStreamImpl*)iface;
HGLOBAL supportHandle;
TRACE("(%p, %ld)\n", iface, libNewSize.s.LowPart);
TRACE("(%p, %ld)\n", iface, libNewSize.u.LowPart);
/*
* As documented.
*/
if (libNewSize.s.HighPart != 0)
if (libNewSize.u.HighPart != 0)
return STG_E_INVALIDFUNCTION;
if (This->streamSize.s.LowPart == libNewSize.s.LowPart)
if (This->streamSize.u.LowPart == libNewSize.u.LowPart)
return S_OK;
/*
* Re allocate the HGlobal to fit the new size of the stream.
*/
supportHandle = GlobalReAlloc(This->supportHandle, libNewSize.s.LowPart, 0);
supportHandle = GlobalReAlloc(This->supportHandle, libNewSize.u.LowPart, 0);
if (supportHandle == 0)
return STG_E_MEDIUMFULL;
This->supportHandle = supportHandle;
This->streamSize.s.LowPart = libNewSize.s.LowPart;
This->streamSize.u.LowPart = libNewSize.u.LowPart;
return S_OK;
}
......@@ -674,7 +674,7 @@ HRESULT WINAPI HGLOBALStreamImpl_CopyTo(
ULARGE_INTEGER totalBytesWritten;
TRACE("(%p, %p, %ld, %p, %p)\n", iface, pstm,
cb.s.LowPart, pcbRead, pcbWritten);
cb.u.LowPart, pcbRead, pcbWritten);
/*
* Sanity check
......@@ -682,28 +682,28 @@ HRESULT WINAPI HGLOBALStreamImpl_CopyTo(
if ( pstm == 0 )
return STG_E_INVALIDPOINTER;
totalBytesRead.s.LowPart = totalBytesRead.s.HighPart = 0;
totalBytesWritten.s.LowPart = totalBytesWritten.s.HighPart = 0;
totalBytesRead.u.LowPart = totalBytesRead.u.HighPart = 0;
totalBytesWritten.u.LowPart = totalBytesWritten.u.HighPart = 0;
/*
* use stack to store data temporarly
* there is surely more performant way of doing it, for now this basic
* implementation will do the job
*/
while ( cb.s.LowPart > 0 )
while ( cb.u.LowPart > 0 )
{
if ( cb.s.LowPart >= 128 )
if ( cb.u.LowPart >= 128 )
copySize = 128;
else
copySize = cb.s.LowPart;
copySize = cb.u.LowPart;
IStream_Read(iface, tmpBuffer, copySize, &bytesRead);
totalBytesRead.s.LowPart += bytesRead;
totalBytesRead.u.LowPart += bytesRead;
IStream_Write(pstm, tmpBuffer, bytesRead, &bytesWritten);
totalBytesWritten.s.LowPart += bytesWritten;
totalBytesWritten.u.LowPart += bytesWritten;
/*
* Check that read & write operations were succesfull
......@@ -715,9 +715,9 @@ HRESULT WINAPI HGLOBALStreamImpl_CopyTo(
}
if (bytesRead!=copySize)
cb.s.LowPart = 0;
cb.u.LowPart = 0;
else
cb.s.LowPart -= bytesRead;
cb.u.LowPart -= bytesRead;
}
/*
......@@ -725,14 +725,14 @@ HRESULT WINAPI HGLOBALStreamImpl_CopyTo(
*/
if (pcbRead)
{
pcbRead->s.LowPart = totalBytesRead.s.LowPart;
pcbRead->s.HighPart = totalBytesRead.s.HighPart;
pcbRead->u.LowPart = totalBytesRead.u.LowPart;
pcbRead->u.HighPart = totalBytesRead.u.HighPart;
}
if (pcbWritten)
{
pcbWritten->s.LowPart = totalBytesWritten.s.LowPart;
pcbWritten->s.HighPart = totalBytesWritten.s.HighPart;
pcbWritten->u.LowPart = totalBytesWritten.u.LowPart;
pcbWritten->u.HighPart = totalBytesWritten.u.HighPart;
}
return hr;
}
......
......@@ -363,13 +363,13 @@ HRESULT WINAPI ItemMonikerImpl_GetSizeMax(IMoniker* iface,
/* for more details see ItemMonikerImpl_Save coments */
pcbSize->s.LowPart = sizeof(DWORD) + /* DWORD which contains delimiter length */
pcbSize->u.LowPart = sizeof(DWORD) + /* DWORD which contains delimiter length */
delimiterLength + /* item delimiter string */
sizeof(DWORD) + /* DWORD which contains item name length */
nameLength + /* item name string */
34; /* this constant was added ! because when I tested this function it usually */
/* returns 34 bytes more than the number of bytes used by IMoniker::Save function */
pcbSize->s.HighPart=0;
pcbSize->u.HighPart=0;
return S_OK;
}
......
......@@ -200,19 +200,19 @@ HRESULT WINAPI GetHGlobalFromILockBytes(ILockBytes* plkbyt, HGLOBAL* phglobal)
ERR("Cannot ILockBytes_Stat, %lx\n",hres);
return hres;
}
FIXME("cbSize is %ld\n",stbuf.cbSize.s.LowPart);
*phglobal = GlobalAlloc( GMEM_MOVEABLE|GMEM_SHARE, stbuf.cbSize.s.LowPart);
FIXME("cbSize is %ld\n",stbuf.cbSize.u.LowPart);
*phglobal = GlobalAlloc( GMEM_MOVEABLE|GMEM_SHARE, stbuf.cbSize.u.LowPart);
if (!*phglobal)
return E_INVALIDARG;
memset(&start,0,sizeof(start));
hres = ILockBytes_ReadAt(plkbyt, start, GlobalLock(*phglobal), stbuf.cbSize.s.LowPart, &xread);
hres = ILockBytes_ReadAt(plkbyt, start, GlobalLock(*phglobal), stbuf.cbSize.u.LowPart, &xread);
GlobalUnlock(*phglobal);
if (hres != S_OK) {
FIXME("%p->ReadAt failed with %lx\n",plkbyt,hres);
return hres;
}
if (stbuf.cbSize.s.LowPart != xread) {
FIXME("Read size is not requested size %ld vs %ld?\n",stbuf.cbSize.s.LowPart, xread);
if (stbuf.cbSize.u.LowPart != xread) {
FIXME("Read size is not requested size %ld vs %ld?\n",stbuf.cbSize.u.LowPart, xread);
}
return S_OK;
}
......@@ -264,8 +264,8 @@ HGLOBALLockBytesImpl* HGLOBALLockBytesImpl_Construct(HGLOBAL hGlobal,
/*
* Initialize the size of the array to the size of the handle.
*/
newLockBytes->byteArraySize.s.HighPart = 0;
newLockBytes->byteArraySize.s.LowPart = GlobalSize(
newLockBytes->byteArraySize.u.HighPart = 0;
newLockBytes->byteArraySize.u.LowPart = GlobalSize(
newLockBytes->supportHandle);
}
......@@ -414,15 +414,15 @@ HRESULT WINAPI HGLOBALLockBytesImpl_ReadAt(
/*
* Make sure the offset is valid.
*/
if (ulOffset.s.LowPart > This->byteArraySize.s.LowPart)
if (ulOffset.u.LowPart > This->byteArraySize.u.LowPart)
return E_FAIL;
/*
* Using the known size of the array, calculate the number of bytes
* to read.
*/
bytesToReadFromBuffer = min(This->byteArraySize.s.LowPart -
ulOffset.s.LowPart, cb);
bytesToReadFromBuffer = min(This->byteArraySize.u.LowPart -
ulOffset.u.LowPart, cb);
/*
* Lock the buffer in position and copy the data.
......@@ -430,7 +430,7 @@ HRESULT WINAPI HGLOBALLockBytesImpl_ReadAt(
supportBuffer = GlobalLock(This->supportHandle);
memcpy(pv,
(char *) supportBuffer + ulOffset.s.LowPart,
(char *) supportBuffer + ulOffset.u.LowPart,
bytesToReadFromBuffer);
/*
......@@ -489,14 +489,14 @@ HRESULT WINAPI HGLOBALLockBytesImpl_WriteAt(
}
else
{
newSize.s.HighPart = 0;
newSize.s.LowPart = ulOffset.s.LowPart + cb;
newSize.u.HighPart = 0;
newSize.u.LowPart = ulOffset.u.LowPart + cb;
}
/*
* Verify if we need to grow the stream
*/
if (newSize.s.LowPart > This->byteArraySize.s.LowPart)
if (newSize.u.LowPart > This->byteArraySize.u.LowPart)
{
/* grow stream */
if (HGLOBALLockBytesImpl_SetSize(iface, newSize) == STG_E_MEDIUMFULL)
......@@ -508,7 +508,7 @@ HRESULT WINAPI HGLOBALLockBytesImpl_WriteAt(
*/
supportBuffer = GlobalLock(This->supportHandle);
memcpy((char *) supportBuffer + ulOffset.s.LowPart, pv, cb);
memcpy((char *) supportBuffer + ulOffset.u.LowPart, pv, cb);
/*
* Return the number of bytes written.
......@@ -550,22 +550,22 @@ HRESULT WINAPI HGLOBALLockBytesImpl_SetSize(
/*
* As documented.
*/
if (libNewSize.s.HighPart != 0)
if (libNewSize.u.HighPart != 0)
return STG_E_INVALIDFUNCTION;
if (This->byteArraySize.s.LowPart == libNewSize.s.LowPart)
if (This->byteArraySize.u.LowPart == libNewSize.u.LowPart)
return S_OK;
/*
* Re allocate the HGlobal to fit the new size of the stream.
*/
supportHandle = GlobalReAlloc(This->supportHandle, libNewSize.s.LowPart, 0);
supportHandle = GlobalReAlloc(This->supportHandle, libNewSize.u.LowPart, 0);
if (supportHandle == 0)
return STG_E_MEDIUMFULL;
This->supportHandle = supportHandle;
This->byteArraySize.s.LowPart = libNewSize.s.LowPart;
This->byteArraySize.u.LowPart = libNewSize.u.LowPart;
return S_OK;
}
......
......@@ -193,8 +193,8 @@ HGLOBALLockBytesImpl16_Construct(HGLOBAL16 hGlobal,
/*
* Initialize the size of the array to the size of the handle.
*/
newLockBytes->byteArraySize.s.HighPart = 0;
newLockBytes->byteArraySize.s.LowPart = GlobalSize16(
newLockBytes->byteArraySize.u.HighPart = 0;
newLockBytes->byteArraySize.u.LowPart = GlobalSize16(
newLockBytes->supportHandle);
return (HGLOBALLockBytesImpl16*)MapLS(newLockBytes);
......@@ -329,7 +329,7 @@ HRESULT WINAPI HGLOBALLockBytesImpl16_ReadAt(
ULONG bytesReadBuffer = 0;
ULONG bytesToReadFromBuffer;
TRACE("(%p,%ld,%p,%ld,%p)\n",This,ulOffset.s.LowPart,pv,cb,pcbRead);
TRACE("(%p,%ld,%p,%ld,%p)\n",This,ulOffset.u.LowPart,pv,cb,pcbRead);
/*
* If the caller is not interested in the number of bytes read,
* we use another buffer to avoid "if" statements in the code.
......@@ -340,15 +340,15 @@ HRESULT WINAPI HGLOBALLockBytesImpl16_ReadAt(
/*
* Make sure the offset is valid.
*/
if (ulOffset.s.LowPart > This->byteArraySize.s.LowPart)
if (ulOffset.u.LowPart > This->byteArraySize.u.LowPart)
return E_FAIL;
/*
* Using the known size of the array, calculate the number of bytes
* to read.
*/
bytesToReadFromBuffer = min(This->byteArraySize.s.LowPart -
ulOffset.s.LowPart, cb);
bytesToReadFromBuffer = min(This->byteArraySize.u.LowPart -
ulOffset.u.LowPart, cb);
/*
* Lock the buffer in position and copy the data.
......@@ -356,7 +356,7 @@ HRESULT WINAPI HGLOBALLockBytesImpl16_ReadAt(
supportBuffer = GlobalLock16(This->supportHandle);
memcpy(pv,
(char *) supportBuffer + ulOffset.s.LowPart,
(char *) supportBuffer + ulOffset.u.LowPart,
bytesToReadFromBuffer);
/*
......@@ -402,7 +402,7 @@ HRESULT WINAPI HGLOBALLockBytesImpl16_WriteAt(
ULARGE_INTEGER newSize;
ULONG bytesWritten = 0;
TRACE("(%p,%ld,%p,%ld,%p)\n",This,ulOffset.s.LowPart,pv,cb,pcbWritten);
TRACE("(%p,%ld,%p,%ld,%p)\n",This,ulOffset.u.LowPart,pv,cb,pcbWritten);
/*
* If the caller is not interested in the number of bytes written,
* we use another buffer to avoid "if" statements in the code.
......@@ -413,13 +413,13 @@ HRESULT WINAPI HGLOBALLockBytesImpl16_WriteAt(
if (cb == 0)
return S_OK;
newSize.s.HighPart = 0;
newSize.s.LowPart = ulOffset.s.LowPart + cb;
newSize.u.HighPart = 0;
newSize.u.LowPart = ulOffset.u.LowPart + cb;
/*
* Verify if we need to grow the stream
*/
if (newSize.s.LowPart > This->byteArraySize.s.LowPart)
if (newSize.u.LowPart > This->byteArraySize.u.LowPart)
{
/* grow stream */
if (HGLOBALLockBytesImpl16_SetSize(iface, newSize) == STG_E_MEDIUMFULL)
......@@ -431,7 +431,7 @@ HRESULT WINAPI HGLOBALLockBytesImpl16_WriteAt(
*/
supportBuffer = GlobalLock16(This->supportHandle);
memcpy((char *) supportBuffer + ulOffset.s.LowPart, pv, cb);
memcpy((char *) supportBuffer + ulOffset.u.LowPart, pv, cb);
/*
* Return the number of bytes written.
......@@ -471,26 +471,26 @@ HRESULT WINAPI HGLOBALLockBytesImpl16_SetSize(
HGLOBALLockBytesImpl16* const This=(HGLOBALLockBytesImpl16*)iface;
HGLOBAL16 supportHandle;
TRACE("(%p,%ld)\n",This,libNewSize.s.LowPart);
TRACE("(%p,%ld)\n",This,libNewSize.u.LowPart);
/*
* As documented.
*/
if (libNewSize.s.HighPart != 0)
if (libNewSize.u.HighPart != 0)
return STG_E_INVALIDFUNCTION;
if (This->byteArraySize.s.LowPart == libNewSize.s.LowPart)
if (This->byteArraySize.u.LowPart == libNewSize.u.LowPart)
return S_OK;
/*
* Re allocate the HGlobal to fit the new size of the stream.
*/
supportHandle = GlobalReAlloc16(This->supportHandle, libNewSize.s.LowPart, 0);
supportHandle = GlobalReAlloc16(This->supportHandle, libNewSize.u.LowPart, 0);
if (supportHandle == 0)
return STG_E_MEDIUMFULL;
This->supportHandle = supportHandle;
This->byteArraySize.s.LowPart = libNewSize.s.LowPart;
This->byteArraySize.u.LowPart = libNewSize.u.LowPart;
return S_OK;
}
......
......@@ -184,14 +184,14 @@ CFStub_Invoke(
return hres;
}
msg->cbBuffer = ststg.cbSize.s.LowPart;
msg->cbBuffer = ststg.cbSize.u.LowPart;
if (msg->Buffer)
msg->Buffer = HeapReAlloc(GetProcessHeap(),0,msg->Buffer,ststg.cbSize.s.LowPart);
msg->Buffer = HeapReAlloc(GetProcessHeap(),0,msg->Buffer,ststg.cbSize.u.LowPart);
else
msg->Buffer = HeapAlloc(GetProcessHeap(),0,ststg.cbSize.s.LowPart);
msg->Buffer = HeapAlloc(GetProcessHeap(),0,ststg.cbSize.u.LowPart);
seekto.s.LowPart = 0;seekto.s.HighPart = 0;
seekto.u.LowPart = 0;seekto.u.HighPart = 0;
hres = IStream_Seek(pStm,seekto,SEEK_SET,&newpos);
if (hres) {
FIXME("IStream_Seek failed, %lx\n",hres);
......
......@@ -547,7 +547,7 @@ HRESULT create_marshalled_proxy(REFCLSID rclsid, REFIID iid, LPVOID *ppv) {
if (hres) return hres;
hres = IStream_Write(pStm,marshalbuffer,bufferlen,&res);
if (hres) goto out;
seekto.s.LowPart = 0;seekto.s.HighPart = 0;
seekto.u.LowPart = 0;seekto.u.HighPart = 0;
hres = IStream_Seek(pStm,seekto,SEEK_SET,&newpos);
hres = CoUnmarshalInterface(pStm,&IID_IClassFactory,ppv);
out:
......
......@@ -222,10 +222,10 @@ static BOOL BIGBLOCKFILE_FileInit(LPBIGBLOCKFILE This, HANDLE hFile)
if (This->hfile == INVALID_HANDLE_VALUE)
return FALSE;
This->filesize.s.LowPart = GetFileSize(This->hfile,
&This->filesize.s.HighPart);
This->filesize.u.LowPart = GetFileSize(This->hfile,
&This->filesize.u.HighPart);
if( This->filesize.s.LowPart || This->filesize.s.HighPart )
if( This->filesize.u.LowPart || This->filesize.u.HighPart )
{
/* create the file mapping object
*/
......@@ -246,7 +246,7 @@ static BOOL BIGBLOCKFILE_FileInit(LPBIGBLOCKFILE This, HANDLE hFile)
This->maplist = NULL;
TRACE("file len %lu\n", This->filesize.s.LowPart);
TRACE("file len %lu\n", This->filesize.u.LowPart);
return TRUE;
}
......@@ -278,12 +278,12 @@ static BOOL BIGBLOCKFILE_MemInit(LPBIGBLOCKFILE This, ILockBytes* plkbyt)
*/
ILockBytes_AddRef(This->pLkbyt);
This->filesize.s.LowPart = GlobalSize(This->hbytearray);
This->filesize.s.HighPart = 0;
This->filesize.u.LowPart = GlobalSize(This->hbytearray);
This->filesize.u.HighPart = 0;
This->pbytearray = GlobalLock(This->hbytearray);
TRACE("mem on %p len %lu\n", This->pbytearray, This->filesize.s.LowPart);
TRACE("mem on %p len %lu\n", This->pbytearray, This->filesize.u.LowPart);
return TRUE;
}
......@@ -338,10 +338,10 @@ void* BIGBLOCKFILE_GetROBigBlock(
*
*/
if (This->blocksize * (index + 1)
> ROUND_UP(This->filesize.s.LowPart, This->blocksize))
> ROUND_UP(This->filesize.u.LowPart, This->blocksize))
{
TRACE("out of range %lu vs %lu\n", This->blocksize * (index + 1),
This->filesize.s.LowPart);
This->filesize.u.LowPart);
return NULL;
}
......@@ -368,12 +368,12 @@ void* BIGBLOCKFILE_GetBigBlock(LPBIGBLOCKFILE This, ULONG index)
/*
* make sure that the block physically exists
*/
if ((This->blocksize * (index + 1)) > This->filesize.s.LowPart)
if ((This->blocksize * (index + 1)) > This->filesize.u.LowPart)
{
ULARGE_INTEGER newSize;
newSize.s.HighPart = 0;
newSize.s.LowPart = This->blocksize * (index + 1);
newSize.u.HighPart = 0;
newSize.u.LowPart = This->blocksize * (index + 1);
BIGBLOCKFILE_SetSize(This, newSize);
}
......@@ -409,10 +409,10 @@ void BIGBLOCKFILE_ReleaseBigBlock(LPBIGBLOCKFILE This, void *pBlock)
*/
void BIGBLOCKFILE_SetSize(LPBIGBLOCKFILE This, ULARGE_INTEGER newSize)
{
if (This->filesize.s.LowPart == newSize.s.LowPart)
if (This->filesize.u.LowPart == newSize.u.LowPart)
return;
TRACE("from %lu to %lu\n", This->filesize.s.LowPart, newSize.s.LowPart);
TRACE("from %lu to %lu\n", This->filesize.u.LowPart, newSize.u.LowPart);
/*
* unmap all views, must be done before call to SetEndFile
*/
......@@ -442,7 +442,7 @@ void BIGBLOCKFILE_SetSize(LPBIGBLOCKFILE This, ULARGE_INTEGER newSize)
* This hack is only needed when saving to smbfs.
*/
memset(buf, '0', 10);
SetFilePointer(This->hfile, newSize.s.LowPart, NULL, FILE_BEGIN);
SetFilePointer(This->hfile, newSize.u.LowPart, NULL, FILE_BEGIN);
WriteFile(This->hfile, buf, 10, NULL, NULL);
/*
* END HACK
......@@ -451,7 +451,7 @@ void BIGBLOCKFILE_SetSize(LPBIGBLOCKFILE This, ULARGE_INTEGER newSize)
/*
* set the new end of file
*/
SetFilePointer(This->hfile, newSize.s.LowPart, NULL, FILE_BEGIN);
SetFilePointer(This->hfile, newSize.u.LowPart, NULL, FILE_BEGIN);
SetEndOfFile(This->hfile);
/*
......@@ -479,8 +479,8 @@ void BIGBLOCKFILE_SetSize(LPBIGBLOCKFILE This, ULARGE_INTEGER newSize)
This->pbytearray = GlobalLock(This->hbytearray);
}
This->filesize.s.LowPart = newSize.s.LowPart;
This->filesize.s.HighPart = newSize.s.HighPart;
This->filesize.u.LowPart = newSize.u.LowPart;
This->filesize.u.HighPart = newSize.u.HighPart;
BIGBLOCKFILE_RemapAllMappedPages(This);
}
......@@ -671,8 +671,8 @@ static BOOL BIGBLOCKFILE_MapPage(LPBIGBLOCKFILE This, MappedPage *page)
if( !This->hfilemap )
return FALSE;
if (lowoffset + PAGE_SIZE > This->filesize.s.LowPart)
numBytesToMap = This->filesize.s.LowPart - lowoffset;
if (lowoffset + PAGE_SIZE > This->filesize.u.LowPart)
numBytesToMap = This->filesize.u.LowPart - lowoffset;
else
numBytesToMap = PAGE_SIZE;
......@@ -831,7 +831,7 @@ static void BIGBLOCKFILE_RemapList(LPBIGBLOCKFILE This, MappedPage *list)
{
MappedPage *next = list->next;
if (list->page_index * PAGE_SIZE > This->filesize.s.LowPart)
if (list->page_index * PAGE_SIZE > This->filesize.u.LowPart)
{
TRACE("discarding %lu\n", list->page_index);
......
......@@ -106,14 +106,14 @@ StgStreamImpl* StgStreamImpl_Construct(
/*
* Start the stream at the beginning.
*/
newStream->currentPosition.s.HighPart = 0;
newStream->currentPosition.s.LowPart = 0;
newStream->currentPosition.u.HighPart = 0;
newStream->currentPosition.u.LowPart = 0;
/*
* Initialize the rest of the data.
*/
newStream->streamSize.s.HighPart = 0;
newStream->streamSize.s.LowPart = 0;
newStream->streamSize.u.HighPart = 0;
newStream->streamSize.u.LowPart = 0;
newStream->bigBlockChain = 0;
newStream->smallBlockChain = 0;
......@@ -294,16 +294,16 @@ void StgStreamImpl_OpenBlockChain(
/*
* This code supports only streams that are <32 bits in size.
*/
assert(This->streamSize.s.HighPart == 0);
assert(This->streamSize.u.HighPart == 0);
if(curProperty.startingBlock == BLOCK_END_OF_CHAIN)
{
assert( (This->streamSize.s.HighPart == 0) && (This->streamSize.s.LowPart == 0) );
assert( (This->streamSize.u.HighPart == 0) && (This->streamSize.u.LowPart == 0) );
}
else
{
if ( (This->streamSize.s.HighPart == 0) &&
(This->streamSize.s.LowPart < LIMIT_TO_USE_SMALL_BLOCK) )
if ( (This->streamSize.u.HighPart == 0) &&
(This->streamSize.u.LowPart < LIMIT_TO_USE_SMALL_BLOCK) )
{
This->smallBlockChain = SmallBlockChainStream_Construct(
This->parentStorage->ancestorStorage,
......@@ -355,7 +355,7 @@ HRESULT WINAPI StgStreamImpl_Read(
* Using the known size of the stream, calculate the number of bytes
* to read from the block chain
*/
bytesToReadFromBuffer = min( This->streamSize.s.LowPart - This->currentPosition.s.LowPart, cb);
bytesToReadFromBuffer = min( This->streamSize.u.LowPart - This->currentPosition.u.LowPart, cb);
/*
* Depending on the type of chain that was opened when the stream was constructed,
......@@ -399,7 +399,7 @@ HRESULT WINAPI StgStreamImpl_Read(
/*
* Advance the pointer for the number of positions read.
*/
This->currentPosition.s.LowPart += *pcbRead;
This->currentPosition.u.LowPart += *pcbRead;
if(*pcbRead != cb)
{
......@@ -469,14 +469,14 @@ HRESULT WINAPI StgStreamImpl_Write(
}
else
{
newSize.s.HighPart = 0;
newSize.s.LowPart = This->currentPosition.s.LowPart + cb;
newSize.u.HighPart = 0;
newSize.u.LowPart = This->currentPosition.u.LowPart + cb;
}
/*
* Verify if we need to grow the stream
*/
if (newSize.s.LowPart > This->streamSize.s.LowPart)
if (newSize.u.LowPart > This->streamSize.u.LowPart)
{
/* grow stream */
IStream_SetSize(iface, newSize);
......@@ -509,7 +509,7 @@ HRESULT WINAPI StgStreamImpl_Write(
/*
* Advance the position pointer for the number of positions written.
*/
This->currentPosition.s.LowPart += *pcbWritten;
This->currentPosition.u.LowPart += *pcbWritten;
return S_OK;
}
......@@ -533,7 +533,7 @@ HRESULT WINAPI StgStreamImpl_Seek(
ULARGE_INTEGER newPosition;
TRACE("(%p, %ld, %ld, %p)\n",
iface, dlibMove.s.LowPart, dwOrigin, plibNewPosition);
iface, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
/*
* The caller is allowed to pass in NULL as the new position return value.
......@@ -552,8 +552,8 @@ HRESULT WINAPI StgStreamImpl_Seek(
switch (dwOrigin)
{
case STREAM_SEEK_SET:
plibNewPosition->s.HighPart = 0;
plibNewPosition->s.LowPart = 0;
plibNewPosition->u.HighPart = 0;
plibNewPosition->u.LowPart = 0;
break;
case STREAM_SEEK_CUR:
*plibNewPosition = This->currentPosition;
......@@ -593,12 +593,12 @@ HRESULT WINAPI StgStreamImpl_SetSize(
StgProperty curProperty;
BOOL Success;
TRACE("(%p, %ld)\n", iface, libNewSize.s.LowPart);
TRACE("(%p, %ld)\n", iface, libNewSize.u.LowPart);
/*
* As documented.
*/
if (libNewSize.s.HighPart != 0)
if (libNewSize.u.HighPart != 0)
return STG_E_INVALIDFUNCTION;
/*
......@@ -607,7 +607,7 @@ HRESULT WINAPI StgStreamImpl_SetSize(
if (!(This->grfMode & (STGM_WRITE | STGM_READWRITE)))
return STG_E_ACCESSDENIED;
if (This->streamSize.s.LowPart == libNewSize.s.LowPart)
if (This->streamSize.u.LowPart == libNewSize.u.LowPart)
return S_OK;
/*
......@@ -615,7 +615,7 @@ HRESULT WINAPI StgStreamImpl_SetSize(
*/
if ((This->smallBlockChain == 0) && (This->bigBlockChain == 0))
{
if (libNewSize.s.LowPart < LIMIT_TO_USE_SMALL_BLOCK)
if (libNewSize.u.LowPart < LIMIT_TO_USE_SMALL_BLOCK)
{
This->smallBlockChain = SmallBlockChainStream_Construct(
This->parentStorage->ancestorStorage,
......@@ -640,9 +640,9 @@ HRESULT WINAPI StgStreamImpl_SetSize(
* Determine if we have to switch from small to big blocks or vice versa
*/
if ( (This->smallBlockChain!=0) &&
(curProperty.size.s.LowPart < LIMIT_TO_USE_SMALL_BLOCK) )
(curProperty.size.u.LowPart < LIMIT_TO_USE_SMALL_BLOCK) )
{
if (libNewSize.s.LowPart >= LIMIT_TO_USE_SMALL_BLOCK)
if (libNewSize.u.LowPart >= LIMIT_TO_USE_SMALL_BLOCK)
{
/*
* Transform the small block chain into a big block chain
......@@ -669,8 +669,8 @@ HRESULT WINAPI StgStreamImpl_SetSize(
This->ownerProperty,
&curProperty);
curProperty.size.s.HighPart = libNewSize.s.HighPart;
curProperty.size.s.LowPart = libNewSize.s.LowPart;
curProperty.size.u.HighPart = libNewSize.u.HighPart;
curProperty.size.u.LowPart = libNewSize.u.LowPart;
if (Success)
{
......@@ -705,7 +705,7 @@ HRESULT WINAPI StgStreamImpl_CopyTo(
ULARGE_INTEGER totalBytesWritten;
TRACE("(%p, %p, %ld, %p, %p)\n",
iface, pstm, cb.s.LowPart, pcbRead, pcbWritten);
iface, pstm, cb.u.LowPart, pcbRead, pcbWritten);
/*
* Sanity check
......@@ -713,28 +713,28 @@ HRESULT WINAPI StgStreamImpl_CopyTo(
if ( pstm == 0 )
return STG_E_INVALIDPOINTER;
totalBytesRead.s.LowPart = totalBytesRead.s.HighPart = 0;
totalBytesWritten.s.LowPart = totalBytesWritten.s.HighPart = 0;
totalBytesRead.u.LowPart = totalBytesRead.u.HighPart = 0;
totalBytesWritten.u.LowPart = totalBytesWritten.u.HighPart = 0;
/*
* use stack to store data temporarily
* there is surely a more performant way of doing it, for now this basic
* implementation will do the job
*/
while ( cb.s.LowPart > 0 )
while ( cb.u.LowPart > 0 )
{
if ( cb.s.LowPart >= 128 )
if ( cb.u.LowPart >= 128 )
copySize = 128;
else
copySize = cb.s.LowPart;
copySize = cb.u.LowPart;
IStream_Read(iface, tmpBuffer, copySize, &bytesRead);
totalBytesRead.s.LowPart += bytesRead;
totalBytesRead.u.LowPart += bytesRead;
IStream_Write(pstm, tmpBuffer, bytesRead, &bytesWritten);
totalBytesWritten.s.LowPart += bytesWritten;
totalBytesWritten.u.LowPart += bytesWritten;
/*
* Check that read & write operations were successful
......@@ -746,9 +746,9 @@ HRESULT WINAPI StgStreamImpl_CopyTo(
}
if (bytesRead!=copySize)
cb.s.LowPart = 0;
cb.u.LowPart = 0;
else
cb.s.LowPart -= bytesRead;
cb.u.LowPart -= bytesRead;
}
/*
......@@ -756,14 +756,14 @@ HRESULT WINAPI StgStreamImpl_CopyTo(
*/
if (pcbRead)
{
pcbRead->s.LowPart = totalBytesRead.s.LowPart;
pcbRead->s.HighPart = totalBytesRead.s.HighPart;
pcbRead->u.LowPart = totalBytesRead.u.LowPart;
pcbRead->u.HighPart = totalBytesRead.u.HighPart;
}
if (pcbWritten)
{
pcbWritten->s.LowPart = totalBytesWritten.s.LowPart;
pcbWritten->s.HighPart = totalBytesWritten.s.HighPart;
pcbWritten->u.LowPart = totalBytesWritten.u.LowPart;
pcbWritten->u.HighPart = totalBytesWritten.u.HighPart;
}
return hr;
}
......
......@@ -796,7 +796,7 @@ HRESULT WINAPI IStream16_fnSeek(
IStream16* iface,LARGE_INTEGER offset,DWORD whence,ULARGE_INTEGER *newpos
) {
ICOM_THIS(IStream16Impl,iface);
TRACE_(relay)("(%p)->([%ld.%ld],%ld,%p)\n",This,offset.s.HighPart,offset.s.LowPart,whence,newpos);
TRACE_(relay)("(%p)->([%ld.%ld],%ld,%p)\n",This,offset.u.HighPart,offset.u.LowPart,whence,newpos);
switch (whence) {
/* unix SEEK_xx should be the same as win95 ones */
......@@ -804,31 +804,31 @@ HRESULT WINAPI IStream16_fnSeek(
/* offset must be ==0 (<0 is invalid, and >0 cannot be handled
* right now.
*/
assert(offset.s.HighPart==0);
This->offset.s.HighPart = offset.s.HighPart;
This->offset.s.LowPart = offset.s.LowPart;
assert(offset.u.HighPart==0);
This->offset.u.HighPart = offset.u.HighPart;
This->offset.u.LowPart = offset.u.LowPart;
break;
case SEEK_CUR:
if (offset.s.HighPart < 0) {
if (offset.u.HighPart < 0) {
/* FIXME: is this negation correct ? */
offset.s.HighPart = -offset.s.HighPart;
offset.s.LowPart = (0xffffffff ^ offset.s.LowPart)+1;
offset.u.HighPart = -offset.u.HighPart;
offset.u.LowPart = (0xffffffff ^ offset.u.LowPart)+1;
assert(offset.s.HighPart==0);
assert(This->offset.s.LowPart >= offset.s.LowPart);
This->offset.s.LowPart -= offset.s.LowPart;
assert(offset.u.HighPart==0);
assert(This->offset.u.LowPart >= offset.u.LowPart);
This->offset.u.LowPart -= offset.u.LowPart;
} else {
assert(offset.s.HighPart==0);
This->offset.s.LowPart+= offset.s.LowPart;
assert(offset.u.HighPart==0);
This->offset.u.LowPart+= offset.u.LowPart;
}
break;
case SEEK_END:
assert(offset.s.HighPart==0);
This->offset.s.LowPart = This->stde.pps_size-offset.s.LowPart;
assert(offset.u.HighPart==0);
This->offset.u.LowPart = This->stde.pps_size-offset.u.LowPart;
break;
}
if (This->offset.s.LowPart>This->stde.pps_size)
This->offset.s.LowPart=This->stde.pps_size;
if (This->offset.u.LowPart>This->stde.pps_size)
This->offset.u.LowPart=This->stde.pps_size;
if (newpos) *newpos = This->offset;
return S_OK;
}
......@@ -848,11 +848,11 @@ HRESULT WINAPI IStream16_fnRead(
if (!pcbRead) bytesread=&xxread;
*bytesread = 0;
if (cb>This->stde.pps_size-This->offset.s.LowPart)
cb=This->stde.pps_size-This->offset.s.LowPart;
if (cb>This->stde.pps_size-This->offset.u.LowPart)
cb=This->stde.pps_size-This->offset.u.LowPart;
if (This->stde.pps_size < 0x1000) {
/* use small block reader */
blocknr = STORAGE_get_nth_next_small_blocknr(This->hf,This->stde.pps_sb,This->offset.s.LowPart/SMALLSIZE);
blocknr = STORAGE_get_nth_next_small_blocknr(This->hf,This->stde.pps_sb,This->offset.u.LowPart/SMALLSIZE);
while (cb) {
int cc;
......@@ -861,10 +861,10 @@ HRESULT WINAPI IStream16_fnRead(
return E_FAIL;
}
cc = cb;
if (cc>SMALLSIZE-(This->offset.s.LowPart&(SMALLSIZE-1)))
cc=SMALLSIZE-(This->offset.s.LowPart&(SMALLSIZE-1));
memcpy((LPBYTE)pv,block+(This->offset.s.LowPart&(SMALLSIZE-1)),cc);
This->offset.s.LowPart+=cc;
if (cc>SMALLSIZE-(This->offset.u.LowPart&(SMALLSIZE-1)))
cc=SMALLSIZE-(This->offset.u.LowPart&(SMALLSIZE-1));
memcpy((LPBYTE)pv,block+(This->offset.u.LowPart&(SMALLSIZE-1)),cc);
This->offset.u.LowPart+=cc;
(LPBYTE)pv+=cc;
*bytesread+=cc;
cb-=cc;
......@@ -872,7 +872,7 @@ HRESULT WINAPI IStream16_fnRead(
}
} else {
/* use big block reader */
blocknr = STORAGE_get_nth_next_big_blocknr(This->hf,This->stde.pps_sb,This->offset.s.LowPart/BIGSIZE);
blocknr = STORAGE_get_nth_next_big_blocknr(This->hf,This->stde.pps_sb,This->offset.u.LowPart/BIGSIZE);
while (cb) {
int cc;
......@@ -881,10 +881,10 @@ HRESULT WINAPI IStream16_fnRead(
return E_FAIL;
}
cc = cb;
if (cc>BIGSIZE-(This->offset.s.LowPart&(BIGSIZE-1)))
cc=BIGSIZE-(This->offset.s.LowPart&(BIGSIZE-1));
memcpy((LPBYTE)pv,block+(This->offset.s.LowPart&(BIGSIZE-1)),cc);
This->offset.s.LowPart+=cc;
if (cc>BIGSIZE-(This->offset.u.LowPart&(BIGSIZE-1)))
cc=BIGSIZE-(This->offset.u.LowPart&(BIGSIZE-1));
memcpy((LPBYTE)pv,block+(This->offset.u.LowPart&(BIGSIZE-1)),cc);
This->offset.u.LowPart+=cc;
(LPBYTE)pv+=cc;
*bytesread+=cc;
cb-=cc;
......@@ -911,7 +911,7 @@ HRESULT WINAPI IStream16_fnWrite(
TRACE_(relay)("(%p)->(%p,%ld,%p)\n",This,pv,cb,pcbWrite);
/* do we need to junk some blocks? */
newsize = This->offset.s.LowPart+cb;
newsize = This->offset.u.LowPart+cb;
oldsize = This->stde.pps_size;
if (newsize < oldsize) {
if (oldsize < 0x1000) {
......@@ -1107,7 +1107,7 @@ HRESULT WINAPI IStream16_fnWrite(
/* finally the write pass */
if (This->stde.pps_size < 0x1000) {
blocknr = STORAGE_get_nth_next_small_blocknr(hf,This->stde.pps_sb,This->offset.s.LowPart/SMALLSIZE);
blocknr = STORAGE_get_nth_next_small_blocknr(hf,This->stde.pps_sb,This->offset.u.LowPart/SMALLSIZE);
assert(blocknr>=0);
while (cb>0) {
/* we ensured that it is allocated above */
......@@ -1118,10 +1118,10 @@ HRESULT WINAPI IStream16_fnWrite(
if (!STORAGE_get_small_block(hf,blocknr,block))
return E_FAIL;
cc = SMALLSIZE-(This->offset.s.LowPart&(SMALLSIZE-1));
cc = SMALLSIZE-(This->offset.u.LowPart&(SMALLSIZE-1));
if (cc>cb)
cc=cb;
memcpy( ((LPBYTE)block)+(This->offset.s.LowPart&(SMALLSIZE-1)),
memcpy( ((LPBYTE)block)+(This->offset.u.LowPart&(SMALLSIZE-1)),
(LPBYTE)((char *) pv+curoffset),
cc
);
......@@ -1130,12 +1130,12 @@ HRESULT WINAPI IStream16_fnWrite(
cb -= cc;
curoffset += cc;
(LPBYTE)pv += cc;
This->offset.s.LowPart += cc;
This->offset.u.LowPart += cc;
*byteswritten += cc;
blocknr = STORAGE_get_next_small_blocknr(hf,blocknr);
}
} else {
blocknr = STORAGE_get_nth_next_big_blocknr(hf,This->stde.pps_sb,This->offset.s.LowPart/BIGSIZE);
blocknr = STORAGE_get_nth_next_big_blocknr(hf,This->stde.pps_sb,This->offset.u.LowPart/BIGSIZE);
assert(blocknr>=0);
while (cb>0) {
/* we ensured that it is allocated above, so it better is */
......@@ -1146,10 +1146,10 @@ HRESULT WINAPI IStream16_fnWrite(
if (!STORAGE_get_big_block(hf,blocknr,block))
return E_FAIL;
cc = BIGSIZE-(This->offset.s.LowPart&(BIGSIZE-1));
cc = BIGSIZE-(This->offset.u.LowPart&(BIGSIZE-1));
if (cc>cb)
cc=cb;
memcpy( ((LPBYTE)block)+(This->offset.s.LowPart&(BIGSIZE-1)),
memcpy( ((LPBYTE)block)+(This->offset.u.LowPart&(BIGSIZE-1)),
(LPBYTE)((char *) pv+curoffset),
cc
);
......@@ -1158,7 +1158,7 @@ HRESULT WINAPI IStream16_fnWrite(
cb -= cc;
curoffset += cc;
(LPBYTE)pv += cc;
This->offset.s.LowPart += cc;
This->offset.u.LowPart += cc;
*byteswritten += cc;
blocknr = STORAGE_get_next_big_blocknr(hf,blocknr);
}
......@@ -1345,7 +1345,7 @@ HRESULT WINAPI IStorage16_fnStat(
WideCharToMultiByte( CP_ACP, 0, This->stde.pps_rawname, -1, nameA, len, NULL, NULL );
pstatstg->pwcsName=(LPOLESTR16)MapLS( nameA );
pstatstg->type = This->stde.pps_type;
pstatstg->cbSize.s.LowPart = This->stde.pps_size;
pstatstg->cbSize.u.LowPart = This->stde.pps_size;
pstatstg->mtime = This->stde.pps_ft1; /* FIXME */ /* why? */
pstatstg->atime = This->stde.pps_ft2; /* FIXME */
pstatstg->ctime = This->stde.pps_ft2; /* FIXME */
......@@ -1469,8 +1469,8 @@ HRESULT WINAPI IStorage16_fnCreateStream(
lpstr = MapSL((SEGPTR)*ppstm);
DuplicateHandle( GetCurrentProcess(), This->hf, GetCurrentProcess(),
&lpstr->hf, 0, TRUE, DUPLICATE_SAME_ACCESS );
lpstr->offset.s.LowPart = 0;
lpstr->offset.s.HighPart = 0;
lpstr->offset.u.LowPart = 0;
lpstr->offset.u.HighPart = 0;
ppsent=STORAGE_get_free_pps_entry(lpstr->hf);
if (ppsent<0)
......@@ -1571,8 +1571,8 @@ HRESULT WINAPI IStorage16_fnOpenStream(
IStream16_fnRelease((IStream16*)lpstr);
return E_FAIL;
}
lpstr->offset.s.LowPart = 0;
lpstr->offset.s.HighPart = 0;
lpstr->offset.u.LowPart = 0;
lpstr->offset.u.HighPart = 0;
lpstr->ppsent = newpps;
return S_OK;
}
......
......@@ -1704,18 +1704,18 @@ static HRESULT WINAPI OLEFontImpl_GetSizeMax(
if (pcbSize==NULL)
return E_POINTER;
pcbSize->s.HighPart = 0;
pcbSize->s.LowPart = 0;
pcbSize->u.HighPart = 0;
pcbSize->u.LowPart = 0;
pcbSize->s.LowPart += sizeof(BYTE); /* Version */
pcbSize->s.LowPart += sizeof(WORD); /* Lang code */
pcbSize->s.LowPart += sizeof(BYTE); /* Flags */
pcbSize->s.LowPart += sizeof(WORD); /* Weight */
pcbSize->s.LowPart += sizeof(DWORD); /* Size */
pcbSize->s.LowPart += sizeof(BYTE); /* StrLength */
pcbSize->u.LowPart += sizeof(BYTE); /* Version */
pcbSize->u.LowPart += sizeof(WORD); /* Lang code */
pcbSize->u.LowPart += sizeof(BYTE); /* Flags */
pcbSize->u.LowPart += sizeof(WORD); /* Weight */
pcbSize->u.LowPart += sizeof(DWORD); /* Size */
pcbSize->u.LowPart += sizeof(BYTE); /* StrLength */
if (this->description.lpstrName!=0)
pcbSize->s.LowPart += lstrlenW(this->description.lpstrName);
pcbSize->u.LowPart += lstrlenW(this->description.lpstrName);
return S_OK;
}
......
......@@ -163,16 +163,16 @@ _marshal_interface(marshal_state *buf, REFIID riid, LPUNKNOWN pUnk) {
goto fail;
}
hres = IStream_Stat(pStm,&ststg,0);
tempbuf = HeapAlloc(GetProcessHeap(), 0, ststg.cbSize.s.LowPart);
tempbuf = HeapAlloc(GetProcessHeap(), 0, ststg.cbSize.u.LowPart);
memset(&seekto,0,sizeof(seekto));
hres = IStream_Seek(pStm,seekto,SEEK_SET,&newpos);
if (hres) { FIXME("Failed Seek %lx\n",hres); goto fail;}
hres = IStream_Read(pStm,tempbuf,ststg.cbSize.s.LowPart,&res);
hres = IStream_Read(pStm,tempbuf,ststg.cbSize.u.LowPart,&res);
if (hres) { FIXME("Failed Read %lx\n",hres); goto fail;}
IStream_Release(pStm);
xsize = ststg.cbSize.s.LowPart;
xsize = ststg.cbSize.u.LowPart;
xbuf_add(buf,(LPBYTE)&xsize,sizeof(xsize));
hres = xbuf_add(buf,tempbuf,ststg.cbSize.s.LowPart);
hres = xbuf_add(buf,tempbuf,ststg.cbSize.u.LowPart);
HeapFree(GetProcessHeap(),0,tempbuf);
return hres;
fail:
......
......@@ -4220,7 +4220,7 @@ HRESULT WINAPI VarDecFromI8(LONG64 llIn, DECIMAL* pDecOut)
DEC_HI32(pDecOut) = 0;
/* Note: This assumes 2s complement integer representation */
if (pLi->s.HighPart & 0x80000000)
if (pLi->u.HighPart & 0x80000000)
{
DEC_SIGNSCALE(pDecOut) = SIGNSCALE(DECIMAL_NEG,0);
DEC_LO64(pDecOut) = -pLi->QuadPart;
......@@ -4228,8 +4228,8 @@ HRESULT WINAPI VarDecFromI8(LONG64 llIn, DECIMAL* pDecOut)
else
{
DEC_SIGNSCALE(pDecOut) = SIGNSCALE(DECIMAL_POS,0);
DEC_MID32(pDecOut) = pLi->s.HighPart;
DEC_LO32(pDecOut) = pLi->s.LowPart;
DEC_MID32(pDecOut) = pLi->u.HighPart;
DEC_LO32(pDecOut) = pLi->u.LowPart;
}
return S_OK;
}
......@@ -4306,8 +4306,8 @@ static ULONG VARIANT_Add(ULONG ulLeft, ULONG ulRight, ULONG* pulHigh)
ULARGE_INTEGER ul64;
ul64.QuadPart = (ULONG64)ulLeft + (ULONG64)ulRight + (ULONG64)*pulHigh;
*pulHigh = ul64.s.HighPart;
return ul64.s.LowPart;
*pulHigh = ul64.u.HighPart;
return ul64.u.LowPart;
}
/* Subtract two unsigned 32 bit values with underflow */
......@@ -4328,10 +4328,10 @@ static ULONG VARIANT_Sub(ULONG ulLeft, ULONG ulRight, ULONG* pulHigh)
invert = 1;
}
if (invert)
ul64.s.HighPart = -ul64.s.HighPart ;
ul64.u.HighPart = -ul64.u.HighPart ;
*pulHigh = ul64.s.HighPart;
return ul64.s.LowPart;
*pulHigh = ul64.u.HighPart;
return ul64.u.LowPart;
}
/* Multiply two unsigned 32 bit values with overflow */
......@@ -4340,8 +4340,8 @@ static ULONG VARIANT_Mul(ULONG ulLeft, ULONG ulRight, ULONG* pulHigh)
ULARGE_INTEGER ul64;
ul64.QuadPart = (ULONG64)ulLeft * (ULONG64)ulRight + (ULONG64)*pulHigh;
*pulHigh = ul64.s.HighPart;
return ul64.s.LowPart;
*pulHigh = ul64.u.HighPart;
return ul64.u.LowPart;
}
/* Compare two decimals that have the same scale */
......
......@@ -154,20 +154,20 @@ static HRESULT WINAPI RpcStream_Seek(LPSTREAM iface,
ICOM_THIS(RpcStreamImpl, iface);
switch (origin) {
case STREAM_SEEK_SET:
This->pos = move.s.LowPart;
This->pos = move.u.LowPart;
break;
case STREAM_SEEK_CUR:
This->pos = This->pos + move.s.LowPart;
This->pos = This->pos + move.u.LowPart;
break;
case STREAM_SEEK_END:
This->pos = *This->size + move.s.LowPart;
This->pos = *This->size + move.u.LowPart;
break;
default:
return STG_E_INVALIDFUNCTION;
}
if (newPos) {
newPos->s.LowPart = This->pos;
newPos->s.HighPart = 0;
newPos->u.LowPart = This->pos;
newPos->u.HighPart = 0;
}
return S_OK;
}
......@@ -176,7 +176,7 @@ static HRESULT WINAPI RpcStream_SetSize(LPSTREAM iface,
ULARGE_INTEGER newSize)
{
ICOM_THIS(RpcStreamImpl, iface);
*This->size = newSize.s.LowPart;
*This->size = newSize.u.LowPart;
return S_OK;
}
......
......@@ -596,14 +596,14 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 * iface, LPCI
if (_ILIsDrive (pidl)) {
_ILSimpleGetText (pidl, szPath, MAX_PATH);
GetDiskFreeSpaceExA (szPath, NULL, &ulBytes, NULL);
StrFormatByteSizeA (ulBytes.s.LowPart, psd->str.u.cStr, MAX_PATH);
StrFormatByteSizeA (ulBytes.u.LowPart, psd->str.u.cStr, MAX_PATH);
}
break;
case 3: /* free size */
if (_ILIsDrive (pidl)) {
_ILSimpleGetText (pidl, szPath, MAX_PATH);
GetDiskFreeSpaceExA (szPath, &ulBytes, NULL, NULL);
StrFormatByteSizeA (ulBytes.s.LowPart, psd->str.u.cStr, MAX_PATH);
StrFormatByteSizeA (ulBytes.u.LowPart, psd->str.u.cStr, MAX_PATH);
}
break;
}
......
......@@ -160,15 +160,15 @@ static HRESULT WINAPI IStream_fnSeek(IStream *iface, LARGE_INTEGER dlibMove,
ICOM_THIS(ISHFileStream, iface);
DWORD dwPos;
TRACE("(%p,%ld,%ld,%p)\n", This, dlibMove.s.LowPart, dwOrigin, pNewPos);
TRACE("(%p,%ld,%ld,%p)\n", This, dlibMove.u.LowPart, dwOrigin, pNewPos);
IStream_fnCommit(iface, 0); /* If ever buffered, this will be needed */
dwPos = SetFilePointer(This->hFile, dlibMove.s.LowPart, NULL, dwOrigin);
dwPos = SetFilePointer(This->hFile, dlibMove.u.LowPart, NULL, dwOrigin);
if (pNewPos)
{
pNewPos->s.HighPart = 0;
pNewPos->s.LowPart = dwPos;
pNewPos->u.HighPart = 0;
pNewPos->u.LowPart = dwPos;
}
return S_OK;
}
......@@ -180,7 +180,7 @@ static HRESULT WINAPI IStream_fnSetSize(IStream *iface, ULARGE_INTEGER libNewSiz
{
ICOM_THIS(ISHFileStream, iface);
TRACE("(%p,%ld)\n", This, libNewSize.s.LowPart);
TRACE("(%p,%ld)\n", This, libNewSize.u.LowPart);
IStream_fnCommit(iface, 0); /* If ever buffered, this will be needed */
return E_NOTIMPL;
}
......@@ -196,7 +196,7 @@ static HRESULT WINAPI IStream_fnCopyTo(IStream *iface, IStream* pstm, ULARGE_INT
ULONGLONG ulSize;
HRESULT hRet = S_OK;
TRACE("(%p,%p,%ld,%p,%p)\n", This, pstm, cb.s.LowPart, pcbRead, pcbWritten);
TRACE("(%p,%p,%ld,%p,%p)\n", This, pstm, cb.u.LowPart, pcbRead, pcbWritten);
if (pcbRead)
pcbRead->QuadPart = 0;
......@@ -265,7 +265,7 @@ static HRESULT WINAPI IStream_fnLockUnlockRegion(IStream *iface, ULARGE_INTEGER
ULARGE_INTEGER cb, DWORD dwLockType)
{
ICOM_THIS(ISHFileStream, iface);
TRACE("(%p,%ld,%ld,%ld)\n", This, libOffset.s.LowPart, cb.s.LowPart, dwLockType);
TRACE("(%p,%ld,%ld,%ld)\n", This, libOffset.u.LowPart, cb.u.LowPart, dwLockType);
return E_NOTIMPL;
}
......@@ -293,8 +293,8 @@ static HRESULT WINAPI IStream_fnStat(IStream *iface, STATSTG* lpStat,
else
lpStat->pwcsName = StrDupW(This->lpszPath);
lpStat->type = This->type;
lpStat->cbSize.s.LowPart = fi.nFileSizeLow;
lpStat->cbSize.s.HighPart = fi.nFileSizeHigh;
lpStat->cbSize.u.LowPart = fi.nFileSizeLow;
lpStat->cbSize.u.HighPart = fi.nFileSizeHigh;
lpStat->mtime = fi.ftLastWriteTime;
lpStat->ctime = fi.ftCreationTime;
lpStat->atime = fi.ftLastAccessTime;
......
......@@ -498,7 +498,7 @@ static HRESULT WINAPI URLMonikerImpl_BindToStorage(IMoniker* iface,
TRACE("res = %ld gle = %08lx url len = %ld\n", hres, GetLastError(), len);
last_read_pos.s.LowPart = last_read_pos.s.HighPart = 0;
last_read_pos.u.LowPart = last_read_pos.u.HighPart = 0;
fmt.cfFormat = 0;
fmt.ptd = NULL;
fmt.dwAspect = 0;
......@@ -525,7 +525,7 @@ static HRESULT WINAPI URLMonikerImpl_BindToStorage(IMoniker* iface,
(total_read == bufread) ? BSCF_FIRSTDATANOTIFICATION :
BSCF_INTERMEDIATEDATANOTIFICATION,
total_read, &fmt, &stg);
last_read_pos.s.LowPart += bufread; /* FIXME */
last_read_pos.u.LowPart += bufread; /* FIXME */
} else
break;
}
......
......@@ -806,8 +806,8 @@ static void MSCDEX_Handler(CONTEXT86* context)
break;
case 1:
/* FIXME: computation is wrong */
rri.DiskOffset.s.HighPart = 0;
rri.DiskOffset.s.LowPart = at << 11;
rri.DiskOffset.u.HighPart = 0;
rri.DiskOffset.u.LowPart = at << 11;
rri.TrackMode = YellowMode2;
rri.SectorCount = num;
DeviceIoControl(h, IOCTL_CDROM_RAW_READ, &rri, sizeof(rri),
......
......@@ -289,7 +289,7 @@ static void CALLBACK set_timer_rate( ULONG_PTR arg )
{
LARGE_INTEGER when;
when.s.LowPart = when.s.HighPart = 0;
when.u.LowPart = when.u.HighPart = 0;
SetWaitableTimer( VGA_timer, &when, arg, VGA_Poll, 0, FALSE );
}
......
......@@ -1126,8 +1126,8 @@ void WINAPI VXD_Win32s( CONTEXT86 *context )
TRACE("NtCreateSection: name=%s\n", atom? name : NULL);
result = CreateFileMappingA(hFile, NULL, protect,
size? size->s.HighPart : 0,
size? size->s.LowPart : 0,
size? size->u.HighPart : 0,
size? size->u.LowPart : 0,
atom? name : NULL);
}
......@@ -1289,12 +1289,12 @@ void WINAPI VXD_Win32s( CONTEXT86 *context )
InheritDisposition, AllocationType, Protect);
TRACE("NtMapViewOfSection: "
"base=%lx, offset=%lx, size=%lx, access=%lx\n",
(DWORD)address, SectionOffset? SectionOffset->s.LowPart : 0,
(DWORD)address, SectionOffset? SectionOffset->u.LowPart : 0,
ViewSize? *ViewSize : 0, access);
result = (DWORD)MapViewOfFileEx(SectionHandle, access,
SectionOffset? SectionOffset->s.HighPart : 0,
SectionOffset? SectionOffset->s.LowPart : 0,
SectionOffset? SectionOffset->u.HighPart : 0,
SectionOffset? SectionOffset->u.LowPart : 0,
ViewSize? *ViewSize : 0, address);
TRACE("NtMapViewOfSection: result=%lx\n", result);
......
......@@ -1668,8 +1668,8 @@ BOOL WINAPI FileTimeToDosDateTime( const FILETIME *ft, LPWORD fatdate,
time_t unixtime;
struct tm* tm;
li.s.LowPart = ft->dwLowDateTime;
li.s.HighPart = ft->dwHighDateTime;
li.u.LowPart = ft->dwLowDateTime;
li.u.HighPart = ft->dwHighDateTime;
RtlTimeToSecondsSince1970( &li, &t );
unixtime = t;
tm = gmtime( &unixtime );
......
......@@ -1552,31 +1552,31 @@ BOOL WINAPI GetDiskFreeSpaceW( LPCWSTR root, LPDWORD cluster_sectors,
if (!DRIVE_GetFreeSpace(drive, &size, &available)) return FALSE;
/* Cap the size and available at 2GB as per specs. */
if ((size.s.HighPart) ||(size.s.LowPart > 0x7fffffff))
if ((size.u.HighPart) ||(size.u.LowPart > 0x7fffffff))
{
size.s.HighPart = 0;
size.s.LowPart = 0x7fffffff;
size.u.HighPart = 0;
size.u.LowPart = 0x7fffffff;
}
if ((available.s.HighPart) ||(available.s.LowPart > 0x7fffffff))
if ((available.u.HighPart) ||(available.u.LowPart > 0x7fffffff))
{
available.s.HighPart =0;
available.s.LowPart = 0x7fffffff;
available.u.HighPart =0;
available.u.LowPart = 0x7fffffff;
}
sec_size = (DRIVE_GetType(drive)==DRIVE_CDROM) ? 2048 : 512;
size.s.LowPart /= sec_size;
available.s.LowPart /= sec_size;
size.u.LowPart /= sec_size;
available.u.LowPart /= sec_size;
/* FIXME: probably have to adjust those variables too for CDFS */
cluster_sec = 1;
while (cluster_sec * 65536 < size.s.LowPart) cluster_sec *= 2;
while (cluster_sec * 65536 < size.u.LowPart) cluster_sec *= 2;
if (cluster_sectors)
*cluster_sectors = cluster_sec;
if (sector_bytes)
*sector_bytes = sec_size;
if (free_clusters)
*free_clusters = available.s.LowPart / cluster_sec;
*free_clusters = available.u.LowPart / cluster_sec;
if (total_clusters)
*total_clusters = size.s.LowPart / cluster_sec;
*total_clusters = size.u.LowPart / cluster_sec;
return TRUE;
}
......@@ -1648,14 +1648,14 @@ BOOL WINAPI GetDiskFreeSpaceExW( LPCWSTR root,
if (total)
{
total->s.HighPart = size.s.HighPart;
total->s.LowPart = size.s.LowPart;
total->u.HighPart = size.u.HighPart;
total->u.LowPart = size.u.LowPart;
}
if (totalfree)
{
totalfree->s.HighPart = available.s.HighPart;
totalfree->s.LowPart = available.s.LowPart;
totalfree->u.HighPart = available.u.HighPart;
totalfree->u.LowPart = available.u.LowPart;
}
if (avail)
......@@ -1679,8 +1679,8 @@ BOOL WINAPI GetDiskFreeSpaceExW( LPCWSTR root,
/* Quick hack, should eventually be fixed to work 100% with
Windows2000 (see comment above). */
avail->s.HighPart = available.s.HighPart;
avail->s.LowPart = available.s.LowPart;
avail->u.HighPart = available.u.HighPart;
avail->u.LowPart = available.u.LowPart;
}
return TRUE;
......
......@@ -1189,8 +1189,8 @@ BOOL WINAPI ReadFileEx(HANDLE hFile, LPVOID buffer, DWORD bytesToRead,
return FALSE;
}
offset.s.LowPart = overlapped->Offset;
offset.s.HighPart = overlapped->OffsetHigh;
offset.u.LowPart = overlapped->Offset;
offset.u.HighPart = overlapped->OffsetHigh;
io_status = (PIO_STATUS_BLOCK)overlapped;
io_status->u.Status = STATUS_PENDING;
......@@ -1234,8 +1234,8 @@ BOOL WINAPI ReadFile( HANDLE hFile, LPVOID buffer, DWORD bytesToRead,
if (overlapped != NULL)
{
offset.s.LowPart = overlapped->Offset;
offset.s.HighPart = overlapped->OffsetHigh;
offset.u.LowPart = overlapped->Offset;
offset.u.HighPart = overlapped->OffsetHigh;
poffset = &offset;
hEvent = overlapped->hEvent;
io_status = (PIO_STATUS_BLOCK)overlapped;
......@@ -1276,8 +1276,8 @@ BOOL WINAPI WriteFileEx(HANDLE hFile, LPCVOID buffer, DWORD bytesToWrite,
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
offset.s.LowPart = overlapped->Offset;
offset.s.HighPart = overlapped->OffsetHigh;
offset.u.LowPart = overlapped->Offset;
offset.u.HighPart = overlapped->OffsetHigh;
io_status = (PIO_STATUS_BLOCK)overlapped;
io_status->u.Status = STATUS_PENDING;
......@@ -1316,8 +1316,8 @@ BOOL WINAPI WriteFile( HANDLE hFile, LPCVOID buffer, DWORD bytesToWrite,
if (overlapped)
{
offset.s.LowPart = overlapped->Offset;
offset.s.HighPart = overlapped->OffsetHigh;
offset.u.LowPart = overlapped->Offset;
offset.u.HighPart = overlapped->OffsetHigh;
poffset = &offset;
hEvent = overlapped->hEvent;
piosb = (PIO_STATUS_BLOCK)overlapped;
......
......@@ -322,8 +322,8 @@ extern "C" {
#define LISet32(li, v) ((li).HighPart = (v) < 0 ? -1 : 0, (li).LowPart = (v))
#define ULISet32(li, v) ((li).HighPart = 0, (li).LowPart = (v))
#else
#define LISet32(li, v) ((li).s.HighPart = (v) < 0 ? -1 : 0, (li).s.LowPart = (v))
#define ULISet32(li, v) ((li).s.HighPart = 0, (li).s.LowPart = (v))
#define LISet32(li, v) ((li).u.HighPart = (v) < 0 ? -1 : 0, (li).u.LowPart = (v))
#define ULISet32(li, v) ((li).u.HighPart = 0, (li).u.LowPart = (v))
#endif
/*****************************************************************************
......
......@@ -2918,7 +2918,18 @@ typedef union _LARGE_INTEGER {
DWORD LowPart;
LONG HighPart;
#endif
} DUMMYSTRUCTNAME;
} u;
#ifndef NONAMELESSSTRUCT
struct {
#ifdef WORDS_BIGENDIAN
LONG HighPart;
DWORD LowPart;
#else
DWORD LowPart;
LONG HighPart;
#endif
};
#endif
LONGLONG QuadPart;
} LARGE_INTEGER, *PLARGE_INTEGER;
......@@ -2931,7 +2942,18 @@ typedef union _ULARGE_INTEGER {
DWORD LowPart;
DWORD HighPart;
#endif
} DUMMYSTRUCTNAME;
} u;
#ifndef NONAMELESSSTRUCT
struct {
#ifdef WORDS_BIGENDIAN
DWORD HighPart;
DWORD LowPart;
#else
DWORD LowPart;
DWORD HighPart;
#endif
};
#endif
ULONGLONG QuadPart;
} ULARGE_INTEGER, *PULARGE_INTEGER;
......
......@@ -435,8 +435,8 @@ static void _w31_loadreg(void)
/* read text */
txt = _xmalloc(head.textsize);
fpi.CurrentByteOffset.s.LowPart = head.textoff;
fpi.CurrentByteOffset.s.HighPart = 0;
fpi.CurrentByteOffset.u.LowPart = head.textoff;
fpi.CurrentByteOffset.u.HighPart = 0;
if (NtSetInformationFile(hf, &iosb, &fpi, sizeof(fpi),
FilePositionInformation) != STATUS_SUCCESS)
{
......
......@@ -93,11 +93,11 @@ static SYSTEMTIME lazy_timeout_time;
#if defined(NONAMELESSSTRUCT)
#define FILETIME_TO_ULARGEINT(filetime, ularge) \
( ularge.s.LowPart = filetime.dwLowDateTime, \
ularge.s.HighPart = filetime.dwHighDateTime )
( ularge.u.LowPart = filetime.dwLowDateTime, \
ularge.u.HighPart = filetime.dwHighDateTime )
#define ULARGEINT_TO_FILETIME(ularge, filetime) \
( filetime.dwLowDateTime = ularge.s.LowPart, \
filetime.dwHighDateTime = ularge.s.HighPart )
( filetime.dwLowDateTime = ularge.u.LowPart, \
filetime.dwHighDateTime = ularge.u.HighPart )
#else
#define FILETIME_TO_ULARGEINT(filetime, ularge) \
( ularge.LowPart = filetime.dwLowDateTime, \
......
......@@ -231,8 +231,8 @@ ULARGE_INTEGER byte_count, file_size;
file_size.LowPart = (fd+i)->nFileSizeLow;
file_size.HighPart = (fd+i)->nFileSizeHigh;
#else
file_size.s.LowPart = (fd+i)->nFileSizeLow;
file_size.s.HighPart = (fd+i)->nFileSizeHigh;
file_size.u.LowPart = (fd+i)->nFileSizeLow;
file_size.u.HighPart = (fd+i)->nFileSizeHigh;
#endif
byte_count.QuadPart += file_size.QuadPart;
}
......@@ -264,8 +264,8 @@ ULARGE_INTEGER byte_count, file_size;
file_size.LowPart = (fd+i)->nFileSizeLow;
file_size.HighPart = (fd+i)->nFileSizeHigh;
#else
file_size.s.LowPart = (fd+i)->nFileSizeLow;
file_size.s.HighPart = (fd+i)->nFileSizeHigh;
file_size.u.LowPart = (fd+i)->nFileSizeLow;
file_size.u.HighPart = (fd+i)->nFileSizeHigh;
#endif
byte_count.QuadPart += file_size.QuadPart;
if (!bare) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment