Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
973ce4a0
Commit
973ce4a0
authored
Aug 25, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved TASK_Create call to KERNEL initialisation routine.
Clear last error code before calling main entry point (reported by James Juran).
parent
350c04b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
kernel_main.c
dlls/kernel/kernel_main.c
+9
-0
process.c
scheduler/process.c
+4
-11
No files found.
dlls/kernel/kernel_main.c
View file @
973ce4a0
...
...
@@ -25,6 +25,8 @@ extern BOOL THUNK_Init(void);
static
BOOL
process_attach
(
void
)
{
HMODULE16
hModule
;
STARTUPINFOA
startup_info
;
UINT
cmdShow
=
1
;
/* SW_SHOWNORMAL but we don't want to include winuser.h here */
/* Setup codepage info */
CODEPAGE_Init
();
...
...
@@ -77,6 +79,13 @@ static BOOL process_attach(void)
/* Read DOS config.sys */
if
(
!
DOSCONF_ReadConfig
())
return
FALSE
;
/* Create 16-bit task */
GetStartupInfoA
(
&
startup_info
);
if
(
startup_info
.
dwFlags
&
STARTF_USESHOWWINDOW
)
cmdShow
=
startup_info
.
wShowWindow
;
if
(
!
TASK_Create
(
(
NE_MODULE
*
)
GlobalLock16
(
MapHModuleLS
(
GetModuleHandleA
(
0
))
),
cmdShow
,
NtCurrentTeb
(),
NULL
,
0
))
return
FALSE
;
return
TRUE
;
}
...
...
scheduler/process.c
View file @
973ce4a0
...
...
@@ -229,6 +229,9 @@ static BOOL process_init( char *argv[] )
*/
static
int
load_system_dlls
(
void
)
{
/* Load KERNEL */
if
(
!
LoadLibraryA
(
"KERNEL32"
))
return
0
;
/* Get pointers to USER routines called by KERNEL */
THUNK_InitCallout
();
...
...
@@ -297,7 +300,6 @@ static void start_process(void)
{
struct
init_process_done_request
*
req
=
get_req_buffer
();
int
debugged
,
console_app
;
UINT
cmdShow
=
SW_SHOWNORMAL
;
LPTHREAD_START_ROUTINE
entry
;
HMODULE
module
=
current_process
.
exe_modref
->
module
;
...
...
@@ -326,16 +328,6 @@ static void start_process(void)
* is sent by REQ_INIT_PROCESS_DONE */
if
(
!
SIGNAL_Init
())
goto
error
;
/* Load KERNEL (necessary for TASK_Create) */
if
(
!
LoadLibraryA
(
"KERNEL32"
))
goto
error
;
/* Create 16-bit task */
if
(
current_startupinfo
.
dwFlags
&
STARTF_USESHOWWINDOW
)
cmdShow
=
current_startupinfo
.
wShowWindow
;
if
(
!
TASK_Create
(
(
NE_MODULE
*
)
GlobalLock16
(
MapHModuleLS
(
module
)
),
cmdShow
,
NtCurrentTeb
(),
NULL
,
0
))
goto
error
;
/* Load the system dlls */
if
(
!
load_system_dlls
())
goto
error
;
...
...
@@ -351,6 +343,7 @@ static void start_process(void)
if
(
debugged
)
DbgBreakPoint
();
/* FIXME: should use _PEB as parameter for NT 3.5 programs !
* Dunno about other OSs */
SetLastError
(
0
);
/* clear error code */
ExitThread
(
entry
(
NULL
)
);
error:
...
...
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