Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
472d0168
Commit
472d0168
authored
Sep 21, 2002
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Sep 21, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct SIZE_T size according to MS SDK.
Change some types to SIZE_T according to MS SDK definitions.
parent
b1658d40
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
94 additions
and
94 deletions
+94
-94
edit.c
controls/edit.c
+1
-1
dosvm.c
dlls/winedos/dosvm.c
+1
-1
basetsd.h
include/basetsd.h
+5
-5
winbase.h
include/winbase.h
+45
-45
global.c
memory/global.c
+4
-4
heap.c
memory/heap.c
+6
-6
local.c
memory/local.c
+5
-5
virtual.c
memory/virtual.c
+15
-15
process.c
scheduler/process.c
+10
-10
thread.c
scheduler/thread.c
+1
-1
newfns.c
win32/newfns.c
+1
-1
No files found.
controls/edit.c
View file @
472d0168
...
...
@@ -2616,7 +2616,7 @@ static HLOCAL EDIT_EM_GetHandle(EDITSTATE *es)
hLocal
=
es
->
hloc32A
;
}
TRACE
(
"Returning %04X, LocalSize() = %d
\n
"
,
hLocal
,
LocalSize
(
hLocal
));
TRACE
(
"Returning %04X, LocalSize() = %
l
d
\n
"
,
hLocal
,
LocalSize
(
hLocal
));
return
hLocal
;
}
...
...
dlls/winedos/dosvm.c
View file @
472d0168
...
...
@@ -415,7 +415,7 @@ DWORD WINAPI DOSVM_Loop( HANDLE hThread )
/* (sort of like APC, but we signal the completion) */
{
DOS_SPC
*
spc
=
(
DOS_SPC
*
)
msg
.
lParam
;
TRACE_
(
int
)(
"calling %p with arg %08x
\n
"
,
spc
->
proc
,
spc
->
arg
);
TRACE_
(
int
)(
"calling %p with arg %08
l
x
\n
"
,
spc
->
proc
,
spc
->
arg
);
(
spc
->
proc
)(
spc
->
arg
);
TRACE_
(
int
)(
"done, signalling event %d
\n
"
,
msg
.
wParam
);
SetEvent
(
msg
.
wParam
);
...
...
include/basetsd.h
View file @
472d0168
...
...
@@ -86,10 +86,10 @@ typedef unsigned __int32 UHALF_PTR, *PUHALF_PTR;
#else
/* FIXME: defined(_WIN32) */
typedef
signed
__int32
INT_PTR
,
*
PINT_PTR
;
typedef
signed
__int32
LONG_PTR
,
*
PLONG_PTR
;
typedef
long
LONG_PTR
,
*
PLONG_PTR
;
typedef
unsigned
__int32
UINT_PTR
,
*
PUINT_PTR
;
typedef
unsigned
__int32
ULONG_PTR
,
*
PULONG_PTR
;
typedef
unsigned
__int32
DWORD_PTR
,
*
PDWORD_PTR
;
typedef
unsigned
long
ULONG_PTR
,
*
PULONG_PTR
;
typedef
ULONG_PTR
DWORD_PTR
,
*
PDWORD_PTR
;
#define MAXINT_PTR 0x7fffffff
#define MININT_PTR 0x80000000
...
...
@@ -104,8 +104,8 @@ typedef unsigned __int16 UHALF_PTR, *PUHALF_PTR;
#endif
/* defined(_WIN64) || defined(_WIN32) */
typedef
INT
_PTR
SSIZE_T
,
*
PSSIZE_T
;
typedef
U
INT
_PTR
SIZE_T
,
*
PSIZE_T
;
typedef
LONG
_PTR
SSIZE_T
,
*
PSSIZE_T
;
typedef
U
LONG
_PTR
SIZE_T
,
*
PSIZE_T
;
/* Some Wine-specific definitions */
...
...
include/winbase.h
View file @
472d0168
This diff is collapsed.
Click to expand it.
memory/global.c
View file @
472d0168
...
...
@@ -1046,7 +1046,7 @@ typedef struct __GLOBAL32_INTERN
*/
HGLOBAL
WINAPI
GlobalAlloc
(
UINT
flags
,
/* [in] Object allocation attributes */
DWORD
size
/* [in] Number of bytes to allocate */
SIZE_T
size
/* [in] Number of bytes to allocate */
)
{
PGLOBAL32_INTERN
pintern
;
DWORD
hpflags
;
...
...
@@ -1239,7 +1239,7 @@ HGLOBAL WINAPI GlobalHandle(
*/
HGLOBAL
WINAPI
GlobalReAlloc
(
HGLOBAL
hmem
,
/* [in] Handle of global memory object */
DWORD
size
,
/* [in] New size of block */
SIZE_T
size
,
/* [in] New size of block */
UINT
flags
/* [in] How to reallocate object */
)
{
LPVOID
palloc
;
...
...
@@ -1395,7 +1395,7 @@ HGLOBAL WINAPI GlobalFree(
* Size in bytes of the global memory object
* 0: Failure
*/
DWORD
WINAPI
GlobalSize
(
SIZE_T
WINAPI
GlobalSize
(
HGLOBAL
hmem
/* [in] Handle of global memory object */
)
{
DWORD
retval
;
...
...
@@ -1512,7 +1512,7 @@ UINT WINAPI GlobalFlags(
/***********************************************************************
* GlobalCompact (KERNEL32.@)
*/
DWORD
WINAPI
GlobalCompact
(
DWORD
minfree
)
SIZE_T
WINAPI
GlobalCompact
(
DWORD
minfree
)
{
return
0
;
/* GlobalCompact does nothing in Win32 */
}
...
...
memory/heap.c
View file @
472d0168
...
...
@@ -135,8 +135,8 @@ inline static HANDLE HEAP_CreateSystemHeap(void)
*/
HANDLE
WINAPI
HeapCreate
(
DWORD
flags
,
/* [in] Heap allocation flag */
DWORD
initialSize
,
/* [in] Initial heap size */
DWORD
maxSize
/* [in] Maximum heap size */
SIZE_T
initialSize
,
/* [in] Initial heap size */
SIZE_T
maxSize
/* [in] Maximum heap size */
)
{
HANDLE
ret
;
...
...
@@ -176,7 +176,7 @@ BOOL WINAPI HeapDestroy( HANDLE heap /* [in] Handle of heap */ )
/***********************************************************************
* HeapCompact (KERNEL32.@)
*/
DWORD
WINAPI
HeapCompact
(
HANDLE
heap
,
DWORD
flags
)
SIZE_T
WINAPI
HeapCompact
(
HANDLE
heap
,
DWORD
flags
)
{
return
RtlCompactHeap
(
heap
,
flags
);
}
...
...
@@ -782,7 +782,7 @@ BOOL16 WINAPI Local32Next16( LOCAL32ENTRY *pLocal32Entry )
/* FIXME: these functions are needed for dlls that aren't properly separated yet */
LPVOID
WINAPI
HeapAlloc
(
HANDLE
heap
,
DWORD
flags
,
DWORD
size
)
LPVOID
WINAPI
HeapAlloc
(
HANDLE
heap
,
DWORD
flags
,
SIZE_T
size
)
{
return
RtlAllocateHeap
(
heap
,
flags
,
size
);
}
...
...
@@ -792,12 +792,12 @@ BOOL WINAPI HeapFree( HANDLE heap, DWORD flags, LPVOID ptr )
return
RtlFreeHeap
(
heap
,
flags
,
ptr
);
}
LPVOID
WINAPI
HeapReAlloc
(
HANDLE
heap
,
DWORD
flags
,
LPVOID
ptr
,
DWORD
size
)
LPVOID
WINAPI
HeapReAlloc
(
HANDLE
heap
,
DWORD
flags
,
LPVOID
ptr
,
SIZE_T
size
)
{
return
RtlReAllocateHeap
(
heap
,
flags
,
ptr
,
size
);
}
DWORD
WINAPI
HeapSize
(
HANDLE
heap
,
DWORD
flags
,
LPVOID
ptr
)
SIZE_T
WINAPI
HeapSize
(
HANDLE
heap
,
DWORD
flags
,
LPVOID
ptr
)
{
return
RtlSizeHeap
(
heap
,
flags
,
ptr
);
}
...
...
memory/local.c
View file @
472d0168
...
...
@@ -1834,7 +1834,7 @@ BOOL16 WINAPI LocalNext16( LOCALENTRY *pLocalEntry )
*/
HLOCAL
WINAPI
LocalAlloc
(
UINT
flags
,
/* [in] Allocation attributes */
DWORD
size
/* [in] Number of bytes to allocate */
SIZE_T
size
/* [in] Number of bytes to allocate */
)
{
return
(
HLOCAL
)
GlobalAlloc
(
flags
,
size
);
}
...
...
@@ -1843,7 +1843,7 @@ HLOCAL WINAPI LocalAlloc(
/***********************************************************************
* LocalCompact (KERNEL32.@)
*/
UIN
T
WINAPI
LocalCompact
(
UINT
minfree
)
SIZE_
T
WINAPI
LocalCompact
(
UINT
minfree
)
{
return
0
;
/* LocalCompact does nothing in Win32 */
}
...
...
@@ -1912,7 +1912,7 @@ LPVOID WINAPI LocalLock(
*/
HLOCAL
WINAPI
LocalReAlloc
(
HLOCAL
handle
,
/* [in] Handle of memory object */
DWORD
size
,
/* [in] New size of block */
SIZE_T
size
,
/* [in] New size of block */
UINT
flags
/* [in] How to reallocate object */
)
{
return
(
HLOCAL
)
GlobalReAlloc
(
(
HGLOBAL
)
handle
,
size
,
flags
);
...
...
@@ -1922,7 +1922,7 @@ HLOCAL WINAPI LocalReAlloc(
/***********************************************************************
* LocalShrink (KERNEL32.@)
*/
UIN
T
WINAPI
LocalShrink
(
HGLOBAL
handle
,
UINT
newsize
)
SIZE_
T
WINAPI
LocalShrink
(
HGLOBAL
handle
,
UINT
newsize
)
{
return
0
;
/* LocalShrink does nothing in Win32 */
}
...
...
@@ -1934,7 +1934,7 @@ UINT WINAPI LocalShrink( HGLOBAL handle, UINT newsize )
* Size: Success
* 0: Failure
*/
UIN
T
WINAPI
LocalSize
(
SIZE_
T
WINAPI
LocalSize
(
HLOCAL
handle
/* [in] Handle of memory object */
)
{
return
GlobalSize
(
(
HGLOBAL
)
handle
);
...
...
memory/virtual.c
View file @
472d0168
...
...
@@ -60,7 +60,7 @@ static WINE_EXCEPTION_FILTER(page_fault)
*/
LPVOID
WINAPI
VirtualAlloc
(
LPVOID
addr
,
/* [in] Address of region to reserve or commit */
DWORD
size
,
/* [in] Size of region */
SIZE_T
size
,
/* [in] Size of region */
DWORD
type
,
/* [in] Type of allocation */
DWORD
protect
)
/* [in] Type of access protection */
{
...
...
@@ -76,7 +76,7 @@ LPVOID WINAPI VirtualAlloc(
LPVOID
WINAPI
VirtualAllocEx
(
HANDLE
hProcess
,
/* [in] Handle of process to do mem operation */
LPVOID
addr
,
/* [in] Address of region to reserve or commit */
DWORD
size
,
/* [in] Size of region */
SIZE_T
size
,
/* [in] Size of region */
DWORD
type
,
/* [in] Type of allocation */
DWORD
protect
)
/* [in] Type of access protection */
{
...
...
@@ -102,7 +102,7 @@ LPVOID WINAPI VirtualAllocEx(
*/
BOOL
WINAPI
VirtualFree
(
LPVOID
addr
,
/* [in] Address of region of committed pages */
DWORD
size
,
/* [in] Size of region */
SIZE_T
size
,
/* [in] Size of region */
DWORD
type
/* [in] Type of operation */
)
{
return
VirtualFreeEx
(
GetCurrentProcess
(),
addr
,
size
,
type
);
...
...
@@ -117,7 +117,7 @@ BOOL WINAPI VirtualFree(
* TRUE: Success
* FALSE: Failure
*/
BOOL
WINAPI
VirtualFreeEx
(
HANDLE
process
,
LPVOID
addr
,
DWORD
size
,
DWORD
type
)
BOOL
WINAPI
VirtualFreeEx
(
HANDLE
process
,
LPVOID
addr
,
SIZE_T
size
,
DWORD
type
)
{
NTSTATUS
status
=
NtFreeVirtualMemory
(
process
,
&
addr
,
&
size
,
type
);
if
(
status
)
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
...
...
@@ -137,7 +137,7 @@ BOOL WINAPI VirtualFreeEx( HANDLE process, LPVOID addr, DWORD size, DWORD type )
* FALSE: Failure
*/
BOOL
WINAPI
VirtualLock
(
LPVOID
addr
,
/* [in] Address of first byte of range to lock */
DWORD
size
)
/* [in] Number of bytes in range to lock */
SIZE_T
size
)
/* [in] Number of bytes in range to lock */
{
NTSTATUS
status
=
NtLockVirtualMemory
(
GetCurrentProcess
(),
&
addr
,
&
size
,
1
);
if
(
status
)
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
...
...
@@ -157,7 +157,7 @@ BOOL WINAPI VirtualLock( LPVOID addr, /* [in] Address of first byte of range to
* FALSE: Failure
*/
BOOL
WINAPI
VirtualUnlock
(
LPVOID
addr
,
/* [in] Address of first byte of range */
DWORD
size
)
/* [in] Number of bytes in range */
SIZE_T
size
)
/* [in] Number of bytes in range */
{
NTSTATUS
status
=
NtUnlockVirtualMemory
(
GetCurrentProcess
(),
&
addr
,
&
size
,
1
);
if
(
status
)
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
...
...
@@ -175,7 +175,7 @@ BOOL WINAPI VirtualUnlock( LPVOID addr, /* [in] Address of first byte of range *
*/
BOOL
WINAPI
VirtualProtect
(
LPVOID
addr
,
/* [in] Address of region of committed pages */
DWORD
size
,
/* [in] Size of region */
SIZE_T
size
,
/* [in] Size of region */
DWORD
new_prot
,
/* [in] Desired access protection */
LPDWORD
old_prot
/* [out] Address of variable to get old protection */
)
{
...
...
@@ -195,7 +195,7 @@ BOOL WINAPI VirtualProtect(
BOOL
WINAPI
VirtualProtectEx
(
HANDLE
process
,
/* [in] Handle of process */
LPVOID
addr
,
/* [in] Address of region of committed pages */
DWORD
size
,
/* [in] Size of region */
SIZE_T
size
,
/* [in] Size of region */
DWORD
new_prot
,
/* [in] Desired access protection */
LPDWORD
old_prot
/* [out] Address of variable to get old protection */
)
{
...
...
@@ -213,10 +213,10 @@ BOOL WINAPI VirtualProtectEx(
* Number of bytes returned in information buffer
* or 0 if addr is >= 0xc0000000 (kernel space).
*/
DWORD
WINAPI
VirtualQuery
(
SIZE_T
WINAPI
VirtualQuery
(
LPCVOID
addr
,
/* [in] Address of region */
LPMEMORY_BASIC_INFORMATION
info
,
/* [out] Address of info buffer */
DWORD
len
/* [in] Size of buffer */
SIZE_T
len
/* [in] Size of buffer */
)
{
return
VirtualQueryEx
(
GetCurrentProcess
(),
addr
,
info
,
len
);
}
...
...
@@ -230,11 +230,11 @@ DWORD WINAPI VirtualQuery(
* RETURNS
* Number of bytes returned in information buffer
*/
DWORD
WINAPI
VirtualQueryEx
(
SIZE_T
WINAPI
VirtualQueryEx
(
HANDLE
process
,
/* [in] Handle of process */
LPCVOID
addr
,
/* [in] Address of region */
LPMEMORY_BASIC_INFORMATION
info
,
/* [out] Address of info buffer */
DWORD
len
/* [in] Size of buffer */
)
SIZE_T
len
/* [in] Size of buffer */
)
{
DWORD
ret
;
NTSTATUS
status
;
...
...
@@ -420,7 +420,7 @@ LPVOID WINAPI MapViewOfFile(
DWORD
access
,
/* [in] Access mode */
DWORD
offset_high
,
/* [in] High-order 32 bits of file offset */
DWORD
offset_low
,
/* [in] Low-order 32 bits of file offset */
DWORD
count
/* [in] Number of bytes to map */
SIZE_T
count
/* [in] Number of bytes to map */
)
{
return
MapViewOfFileEx
(
mapping
,
access
,
offset_high
,
offset_low
,
count
,
NULL
);
...
...
@@ -440,7 +440,7 @@ LPVOID WINAPI MapViewOfFileEx(
DWORD
access
,
/* [in] Access mode */
DWORD
offset_high
,
/* [in] High-order 32 bits of file offset */
DWORD
offset_low
,
/* [in] Low-order 32 bits of file offset */
DWORD
count
,
/* [in] Number of bytes to map */
SIZE_T
count
,
/* [in] Number of bytes to map */
LPVOID
addr
/* [in] Suggested starting address for mapped view */
)
{
NTSTATUS
status
;
...
...
@@ -493,7 +493,7 @@ BOOL WINAPI UnmapViewOfFile( LPVOID addr ) /* [in] Address where mapped view beg
* FALSE: Failure
*/
BOOL
WINAPI
FlushViewOfFile
(
LPCVOID
base
,
/* [in] Start address of byte range to flush */
DWORD
size
)
/* [in] Number of bytes in range */
SIZE_T
size
)
/* [in] Number of bytes in range */
{
NTSTATUS
status
=
NtFlushVirtualMemory
(
GetCurrentProcess
(),
&
base
,
&
size
,
0
);
if
(
status
)
...
...
scheduler/process.c
View file @
472d0168
...
...
@@ -1625,11 +1625,11 @@ DWORD WINAPI GetProcessFlags( DWORD processid )
*
* RETURNS STD
*/
BOOL
WINAPI
SetProcessWorkingSetSize
(
HANDLE
hProcess
,
DWORD
minset
,
DWORD
maxset
)
BOOL
WINAPI
SetProcessWorkingSetSize
(
HANDLE
hProcess
,
SIZE_T
minset
,
SIZE_T
maxset
)
{
FIXME
(
"(0x%08x,%ld,%ld): stub - harmless
\n
"
,
hProcess
,
minset
,
maxset
);
if
((
minset
==
(
DWORD
)
-
1
)
&&
(
maxset
==
(
DWORD
)
-
1
))
{
if
((
minset
==
(
SIZE_T
)
-
1
)
&&
(
maxset
==
(
SIZE_T
)
-
1
))
{
/* Trim the working set to zero */
/* Swap the process out of physical RAM */
}
...
...
@@ -1639,8 +1639,8 @@ BOOL WINAPI SetProcessWorkingSetSize(HANDLE hProcess,DWORD minset,
/***********************************************************************
* GetProcessWorkingSetSize (KERNEL32.@)
*/
BOOL
WINAPI
GetProcessWorkingSetSize
(
HANDLE
hProcess
,
LPDWORD
minset
,
LPDWORD
maxset
)
BOOL
WINAPI
GetProcessWorkingSetSize
(
HANDLE
hProcess
,
PSIZE_T
minset
,
PSIZE_T
maxset
)
{
FIXME
(
"(0x%08x,%p,%p): stub
\n
"
,
hProcess
,
minset
,
maxset
);
/* 32 MB working set size */
...
...
@@ -1693,8 +1693,8 @@ BOOL WINAPI SetProcessPriorityBoost(HANDLE hprocess,BOOL disableboost)
/***********************************************************************
* ReadProcessMemory (KERNEL32.@)
*/
BOOL
WINAPI
ReadProcessMemory
(
HANDLE
process
,
LPCVOID
addr
,
LPVOID
buffer
,
DWORD
size
,
LPDWORD
bytes_read
)
BOOL
WINAPI
ReadProcessMemory
(
HANDLE
process
,
LPCVOID
addr
,
LPVOID
buffer
,
SIZE_T
size
,
SIZE_T
*
bytes_read
)
{
DWORD
res
;
...
...
@@ -1714,8 +1714,8 @@ BOOL WINAPI ReadProcessMemory( HANDLE process, LPCVOID addr, LPVOID buffer, DWOR
/***********************************************************************
* WriteProcessMemory (KERNEL32.@)
*/
BOOL
WINAPI
WriteProcessMemory
(
HANDLE
process
,
LPVOID
addr
,
LPCVOID
buffer
,
DWORD
size
,
LPDWORD
bytes_written
)
BOOL
WINAPI
WriteProcessMemory
(
HANDLE
process
,
LPVOID
addr
,
LPCVOID
buffer
,
SIZE_T
size
,
SIZE_T
*
bytes_written
)
{
static
const
int
zero
;
unsigned
int
first_offset
,
last_offset
,
first_mask
,
last_mask
;
...
...
@@ -1753,7 +1753,7 @@ BOOL WINAPI WriteProcessMemory( HANDLE process, LPVOID addr, LPCVOID buffer, DWO
if
(
bytes_written
)
*
bytes_written
=
size
;
{
char
dummy
[
32
];
DWORD
read
;
SIZE_T
read
;
ReadProcessMemory
(
process
,
addr
,
dummy
,
sizeof
(
dummy
),
&
read
);
}
return
!
res
;
...
...
scheduler/thread.c
View file @
472d0168
...
...
@@ -271,7 +271,7 @@ static void THREAD_Start(void)
/***********************************************************************
* CreateThread (KERNEL32.@)
*/
HANDLE
WINAPI
CreateThread
(
SECURITY_ATTRIBUTES
*
sa
,
DWORD
stack
,
HANDLE
WINAPI
CreateThread
(
SECURITY_ATTRIBUTES
*
sa
,
SIZE_T
stack
,
LPTHREAD_START_ROUTINE
start
,
LPVOID
param
,
DWORD
flags
,
LPDWORD
id
)
{
...
...
win32/newfns.c
View file @
472d0168
...
...
@@ -156,7 +156,7 @@ BOOL WINAPI QueryPerformanceFrequency(PLARGE_INTEGER frequency)
/****************************************************************************
* FlushInstructionCache (KERNEL32.@)
*/
BOOL
WINAPI
FlushInstructionCache
(
HANDLE
hProcess
,
LPCVOID
lpBaseAddress
,
DWORD
dwSize
)
BOOL
WINAPI
FlushInstructionCache
(
HANDLE
hProcess
,
LPCVOID
lpBaseAddress
,
SIZE_T
dwSize
)
{
if
(
GetVersion
()
&
0x80000000
)
return
TRUE
;
/* not NT, always TRUE */
FIXME_
(
debug
)(
"(0x%08lx,%p,0x%08lx): stub
\n
"
,(
DWORD
)
hProcess
,
lpBaseAddress
,
dwSize
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment