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
687ecfa3
Commit
687ecfa3
authored
Oct 08, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved a few more functions to the dlls/kernel directory.
parent
b81d9e7c
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
179 additions
and
253 deletions
+179
-253
Makefile.in
dlls/kernel/Makefile.in
+1
-5
console.c
dlls/kernel/console.c
+12
-0
device.c
dlls/kernel/device.c
+0
-0
process.c
dlls/kernel/process.c
+139
-0
sync.c
dlls/kernel/sync.c
+25
-0
Makefile.in
dlls/ntdll/Makefile.in
+2
-0
handle.c
scheduler/handle.c
+0
-168
newfns.c
win32/newfns.c
+0
-80
No files found.
dlls/kernel/Makefile.in
View file @
687ecfa3
...
...
@@ -34,15 +34,13 @@ C_SRCS = \
$(TOPOBJDIR)
/misc/registry.c
\
$(TOPOBJDIR)
/msdos/dpmi.c
\
$(TOPOBJDIR)
/msdos/int21.c
\
$(TOPOBJDIR)
/scheduler/handle.c
\
$(TOPOBJDIR)
/win32/device.c
\
$(TOPOBJDIR)
/win32/newfns.c
\
atom.c
\
change.c
\
comm.c
\
computername.c
\
console.c
\
debugger.c
\
device.c
\
dosmem.c
\
editline.c
\
except.c
\
...
...
@@ -108,8 +106,6 @@ EXTRASUBDIRS = \
$(TOPOBJDIR)
/memory
\
$(TOPOBJDIR)
/misc
\
$(TOPOBJDIR)
/msdos
\
$(TOPOBJDIR)
/scheduler
\
$(TOPOBJDIR)
/win32
\
messages
\
nls
...
...
dlls/kernel/console.c
View file @
687ecfa3
...
...
@@ -168,6 +168,18 @@ BOOL WINAPI SetConsoleOutputCP(UINT cp)
}
/***********************************************************************
* Beep (KERNEL32.@)
*/
BOOL
WINAPI
Beep
(
DWORD
dwFreq
,
DWORD
dwDur
)
{
static
const
char
beep
=
'\a'
;
/* dwFreq and dwDur are ignored by Win95 */
if
(
isatty
(
2
))
write
(
2
,
&
beep
,
1
);
return
TRUE
;
}
/******************************************************************************
* WriteConsoleInputA [KERNEL32.@]
*/
...
...
win32
/device.c
→
dlls/kernel
/device.c
View file @
687ecfa3
File moved
dlls/kernel/process.c
View file @
687ecfa3
...
...
@@ -2075,6 +2075,145 @@ DWORD WINAPI MapProcessHandle( HANDLE handle )
}
/*********************************************************************
* CloseW32Handle (KERNEL.474)
* CloseHandle (KERNEL32.@)
*/
BOOL
WINAPI
CloseHandle
(
HANDLE
handle
)
{
NTSTATUS
status
;
/* stdio handles need special treatment */
if
((
handle
==
(
HANDLE
)
STD_INPUT_HANDLE
)
||
(
handle
==
(
HANDLE
)
STD_OUTPUT_HANDLE
)
||
(
handle
==
(
HANDLE
)
STD_ERROR_HANDLE
))
handle
=
GetStdHandle
(
(
DWORD
)
handle
);
if
(
is_console_handle
(
handle
))
return
CloseConsoleHandle
(
handle
);
status
=
NtClose
(
handle
);
if
(
status
)
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
!
status
;
}
/*********************************************************************
* GetHandleInformation (KERNEL32.@)
*/
BOOL
WINAPI
GetHandleInformation
(
HANDLE
handle
,
LPDWORD
flags
)
{
BOOL
ret
;
SERVER_START_REQ
(
set_handle_info
)
{
req
->
handle
=
handle
;
req
->
flags
=
0
;
req
->
mask
=
0
;
req
->
fd
=
-
1
;
ret
=
!
wine_server_call_err
(
req
);
if
(
ret
&&
flags
)
*
flags
=
reply
->
old_flags
;
}
SERVER_END_REQ
;
return
ret
;
}
/*********************************************************************
* SetHandleInformation (KERNEL32.@)
*/
BOOL
WINAPI
SetHandleInformation
(
HANDLE
handle
,
DWORD
mask
,
DWORD
flags
)
{
BOOL
ret
;
SERVER_START_REQ
(
set_handle_info
)
{
req
->
handle
=
handle
;
req
->
flags
=
flags
;
req
->
mask
=
mask
;
req
->
fd
=
-
1
;
ret
=
!
wine_server_call_err
(
req
);
}
SERVER_END_REQ
;
return
ret
;
}
/*********************************************************************
* DuplicateHandle (KERNEL32.@)
*/
BOOL
WINAPI
DuplicateHandle
(
HANDLE
source_process
,
HANDLE
source
,
HANDLE
dest_process
,
HANDLE
*
dest
,
DWORD
access
,
BOOL
inherit
,
DWORD
options
)
{
NTSTATUS
status
;
if
(
is_console_handle
(
source
))
{
/* FIXME: this test is not sufficient, we need to test process ids, not handles */
if
(
source_process
!=
dest_process
||
source_process
!=
GetCurrentProcess
())
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
*
dest
=
DuplicateConsoleHandle
(
source
,
access
,
inherit
,
options
);
return
(
*
dest
!=
INVALID_HANDLE_VALUE
);
}
status
=
NtDuplicateObject
(
source_process
,
source
,
dest_process
,
dest
,
access
,
inherit
?
OBJ_INHERIT
:
0
,
options
);
if
(
status
)
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
!
status
;
}
/***********************************************************************
* ConvertToGlobalHandle (KERNEL.476)
* ConvertToGlobalHandle (KERNEL32.@)
*/
HANDLE
WINAPI
ConvertToGlobalHandle
(
HANDLE
hSrc
)
{
HANDLE
ret
=
INVALID_HANDLE_VALUE
;
DuplicateHandle
(
GetCurrentProcess
(),
hSrc
,
GetCurrentProcess
(),
&
ret
,
0
,
FALSE
,
DUP_HANDLE_MAKE_GLOBAL
|
DUP_HANDLE_SAME_ACCESS
|
DUP_HANDLE_CLOSE_SOURCE
);
return
ret
;
}
/***********************************************************************
* SetHandleContext (KERNEL32.@)
*/
BOOL
WINAPI
SetHandleContext
(
HANDLE
hnd
,
DWORD
context
)
{
FIXME
(
"(%p,%ld), stub. In case this got called by WSOCK32/WS2_32: "
"the external WINSOCK DLLs won't work with WINE, don't use them.
\n
"
,
hnd
,
context
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
/***********************************************************************
* GetHandleContext (KERNEL32.@)
*/
DWORD
WINAPI
GetHandleContext
(
HANDLE
hnd
)
{
FIXME
(
"(%p), stub. In case this got called by WSOCK32/WS2_32: "
"the external WINSOCK DLLs won't work with WINE, don't use them.
\n
"
,
hnd
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
0
;
}
/***********************************************************************
* CreateSocketHandle (KERNEL32.@)
*/
HANDLE
WINAPI
CreateSocketHandle
(
void
)
{
FIXME
(
"(), stub. In case this got called by WSOCK32/WS2_32: "
"the external WINSOCK DLLs won't work with WINE, don't use them.
\n
"
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
INVALID_HANDLE_VALUE
;
}
/***********************************************************************
* SetPriorityClass (KERNEL32.@)
*/
...
...
dlls/kernel/sync.c
View file @
687ecfa3
...
...
@@ -1487,6 +1487,31 @@ BOOL WINAPI SetMailslotInfo( HANDLE hMailslot, DWORD dwReadTimeout)
}
/******************************************************************************
* CreateIoCompletionPort (KERNEL32.@)
*/
HANDLE
WINAPI
CreateIoCompletionPort
(
HANDLE
hFileHandle
,
HANDLE
hExistingCompletionPort
,
DWORD
dwCompletionKey
,
DWORD
dwNumberOfConcurrentThreads
)
{
FIXME
(
"(%p, %p, %08lx, %08lx): stub.
\n
"
,
hFileHandle
,
hExistingCompletionPort
,
dwCompletionKey
,
dwNumberOfConcurrentThreads
);
return
NULL
;
}
/******************************************************************************
* GetQueuedCompletionStatus (KERNEL32.@)
*/
BOOL
WINAPI
GetQueuedCompletionStatus
(
HANDLE
CompletionPort
,
LPDWORD
lpNumberOfBytesTransferred
,
LPDWORD
lpCompletionKey
,
LPOVERLAPPED
*
lpOverlapped
,
DWORD
dwMilliseconds
)
{
FIXME
(
"(%p,%p,%p,%p,%ld), stub!
\n
"
,
CompletionPort
,
lpNumberOfBytesTransferred
,
lpCompletionKey
,
lpOverlapped
,
dwMilliseconds
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
#ifdef __i386__
/***********************************************************************
...
...
dlls/ntdll/Makefile.in
View file @
687ecfa3
...
...
@@ -50,6 +50,8 @@ EXTRA_OBJS = $(ASM_SRCS:.s=.o)
SUBDIRS
=
tests
EXTRASUBDIRS
=
$(TOPOBJDIR)
/scheduler
@MAKE_DLL_RULES@
relay32.s
:
$(WINEBUILD)
...
...
scheduler/handle.c
deleted
100644 → 0
View file @
b81d9e7c
/*
* Win32 process handles
*
* Copyright 1998 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
#ifdef HAVE_IO_H
# include <io.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include "windef.h"
#include "winbase.h"
#include "wine/server.h"
#include "winerror.h"
#include "wine/debug.h"
#include "../kernel/kernel_private.h"
/* FIXME: to be changed when moving file to dlls/kernel */
WINE_DEFAULT_DEBUG_CHANNEL
(
win32
);
/*********************************************************************
* CloseW32Handle (KERNEL.474)
* CloseHandle (KERNEL32.@)
*/
BOOL
WINAPI
CloseHandle
(
HANDLE
handle
)
{
NTSTATUS
status
;
/* stdio handles need special treatment */
if
((
handle
==
(
HANDLE
)
STD_INPUT_HANDLE
)
||
(
handle
==
(
HANDLE
)
STD_OUTPUT_HANDLE
)
||
(
handle
==
(
HANDLE
)
STD_ERROR_HANDLE
))
handle
=
GetStdHandle
(
(
DWORD
)
handle
);
if
(
is_console_handle
(
handle
))
return
CloseConsoleHandle
(
handle
);
status
=
NtClose
(
handle
);
if
(
status
)
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
!
status
;
}
/*********************************************************************
* GetHandleInformation (KERNEL32.@)
*/
BOOL
WINAPI
GetHandleInformation
(
HANDLE
handle
,
LPDWORD
flags
)
{
BOOL
ret
;
SERVER_START_REQ
(
set_handle_info
)
{
req
->
handle
=
handle
;
req
->
flags
=
0
;
req
->
mask
=
0
;
req
->
fd
=
-
1
;
ret
=
!
wine_server_call_err
(
req
);
if
(
ret
&&
flags
)
*
flags
=
reply
->
old_flags
;
}
SERVER_END_REQ
;
return
ret
;
}
/*********************************************************************
* SetHandleInformation (KERNEL32.@)
*/
BOOL
WINAPI
SetHandleInformation
(
HANDLE
handle
,
DWORD
mask
,
DWORD
flags
)
{
BOOL
ret
;
SERVER_START_REQ
(
set_handle_info
)
{
req
->
handle
=
handle
;
req
->
flags
=
flags
;
req
->
mask
=
mask
;
req
->
fd
=
-
1
;
ret
=
!
wine_server_call_err
(
req
);
}
SERVER_END_REQ
;
return
ret
;
}
/*********************************************************************
* DuplicateHandle (KERNEL32.@)
*/
BOOL
WINAPI
DuplicateHandle
(
HANDLE
source_process
,
HANDLE
source
,
HANDLE
dest_process
,
HANDLE
*
dest
,
DWORD
access
,
BOOL
inherit
,
DWORD
options
)
{
NTSTATUS
status
;
if
(
is_console_handle
(
source
))
{
/* FIXME: this test is not sufficient, we need to test process ids, not handles */
if
(
source_process
!=
dest_process
||
source_process
!=
GetCurrentProcess
())
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
*
dest
=
DuplicateConsoleHandle
(
source
,
access
,
inherit
,
options
);
return
(
*
dest
!=
INVALID_HANDLE_VALUE
);
}
status
=
NtDuplicateObject
(
source_process
,
source
,
dest_process
,
dest
,
access
,
inherit
?
OBJ_INHERIT
:
0
,
options
);
if
(
status
)
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
!
status
;
}
/***********************************************************************
* ConvertToGlobalHandle (KERNEL.476)
* ConvertToGlobalHandle (KERNEL32.@)
*/
HANDLE
WINAPI
ConvertToGlobalHandle
(
HANDLE
hSrc
)
{
HANDLE
ret
=
INVALID_HANDLE_VALUE
;
DuplicateHandle
(
GetCurrentProcess
(),
hSrc
,
GetCurrentProcess
(),
&
ret
,
0
,
FALSE
,
DUP_HANDLE_MAKE_GLOBAL
|
DUP_HANDLE_SAME_ACCESS
|
DUP_HANDLE_CLOSE_SOURCE
);
return
ret
;
}
/***********************************************************************
* SetHandleContext (KERNEL32.@)
*/
BOOL
WINAPI
SetHandleContext
(
HANDLE
hnd
,
DWORD
context
)
{
FIXME
(
"(%p,%ld), stub. In case this got called by WSOCK32/WS2_32: the external WINSOCK DLLs won't work with WINE, don't use them.
\n
"
,
hnd
,
context
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
/***********************************************************************
* GetHandleContext (KERNEL32.@)
*/
DWORD
WINAPI
GetHandleContext
(
HANDLE
hnd
)
{
FIXME
(
"(%p), stub. In case this got called by WSOCK32/WS2_32: the external WINSOCK DLLs won't work with WINE, don't use them.
\n
"
,
hnd
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
0
;
}
/***********************************************************************
* CreateSocketHandle (KERNEL32.@)
*/
HANDLE
WINAPI
CreateSocketHandle
(
void
)
{
FIXME
(
"(), stub. In case this got called by WSOCK32/WS2_32: the external WINSOCK DLLs won't work with WINE, don't use them.
\n
"
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
INVALID_HANDLE_VALUE
;
}
win32/newfns.c
deleted
100644 → 0
View file @
b81d9e7c
/*
* Win32 miscellaneous functions
*
* Copyright 1995 Thomas Sandford (tdgsandf@prds-grn.demon.co.uk)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* Misc. new functions - they should be moved into appropriate files
at a later date. */
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "winerror.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
win32
);
/******************************************************************************
* CreateIoCompletionPort (KERNEL32.@)
*/
HANDLE
WINAPI
CreateIoCompletionPort
(
HANDLE
hFileHandle
,
HANDLE
hExistingCompletionPort
,
DWORD
dwCompletionKey
,
DWORD
dwNumberOfConcurrentThreads
)
{
FIXME
(
"(%p, %p, %08lx, %08lx): stub.
\n
"
,
hFileHandle
,
hExistingCompletionPort
,
dwCompletionKey
,
dwNumberOfConcurrentThreads
);
return
NULL
;
}
/******************************************************************************
* GetQueuedCompletionStatus (KERNEL32.@)
*/
BOOL
WINAPI
GetQueuedCompletionStatus
(
HANDLE
CompletionPort
,
LPDWORD
lpNumberOfBytesTransferred
,
LPDWORD
lpCompletionKey
,
LPOVERLAPPED
*
lpOverlapped
,
DWORD
dwMilliseconds
)
{
FIXME
(
"(%p,%p,%p,%p,%ld), stub!
\n
"
,
CompletionPort
,
lpNumberOfBytesTransferred
,
lpCompletionKey
,
lpOverlapped
,
dwMilliseconds
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
/***********************************************************************
* Beep (KERNEL32.@)
*/
BOOL
WINAPI
Beep
(
DWORD
dwFreq
,
DWORD
dwDur
)
{
static
const
char
beep
=
'\a'
;
/* dwFreq and dwDur are ignored by Win95 */
if
(
isatty
(
2
))
write
(
2
,
&
beep
,
1
);
return
TRUE
;
}
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