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
4d1cf9c8
Commit
4d1cf9c8
authored
May 13, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Add a builtin 16-bit winhelp.exe.
This should be moved to winhlp32.exe once we support 16-bit modules in executables.
parent
a795f36a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
2 deletions
+65
-2
.gitignore
.gitignore
+1
-0
Makefile.in
dlls/Makefile.in
+2
-1
Makefile.in
dlls/kernel32/Makefile.in
+4
-1
kernel16.c
dlls/kernel32/kernel16.c
+58
-0
No files found.
.gitignore
View file @
4d1cf9c8
...
...
@@ -446,6 +446,7 @@ dlls/wined3d/libwined3d.def
dlls/winedos/libwinedos.def
dlls/wineps16.drv16
dlls/wing.dll16
dlls/winhelp.exe16
dlls/wininet/libwininet.def
dlls/wininet/tests/*.ok
dlls/wininet/tests/testlist.c
...
...
dlls/Makefile.in
View file @
4d1cf9c8
...
...
@@ -426,6 +426,7 @@ WIN16_FILES = \
windebug.dll16
\
wineps16.drv16
\
wing.dll16
\
winhelp.exe16
\
winnls.dll16
\
winoldap.mod16
\
winsock.dll16
\
...
...
@@ -455,7 +456,7 @@ dispdib.dll16 gdi.exe16 wing.dll16:
imm.dll16
:
echo
"imm32.dll"
>
$@
comm.drv16 krnl386.exe16 stress.dll16 system.drv16 toolhelp.dll16 win87em.dll16 windebug.dll16 winoldap.mod16
:
comm.drv16 krnl386.exe16 stress.dll16 system.drv16 toolhelp.dll16 win87em.dll16 windebug.dll16 win
help.exe16 win
oldap.mod16
:
echo
"kernel32.dll"
>
$@
lzexpand.dll16
:
...
...
dlls/kernel32/Makefile.in
View file @
4d1cf9c8
...
...
@@ -96,7 +96,7 @@ MC_SRCS = \
nls/winerr_kor.mc
EXTRA_OBJS
=
relay16asm.o
EXTRA_OBJS16
=
winoldap.mod.o
EXTRA_OBJS16
=
win
help.exe.o win
oldap.mod.o
EXTRASUBDIRS
=
nls
...
...
@@ -110,6 +110,9 @@ relay16asm.o: $(WINEBUILD)
winoldap.mod.o
:
$(WINEBUILD)
$(WINEBUILD)
$(WINEBUILDFLAGS)
--exe
-o
$@
--main-module
$(MODULE)
--entry
WINOLDAP_EntryPoint
winhelp.exe.o
:
$(WINEBUILD)
$(WINEBUILD)
$(WINEBUILDFLAGS)
--exe
-o
$@
--main-module
$(MODULE)
--entry
WINHELP_EntryPoint
# Special rules for 16-bit resource and spec files
krnl386.exe.spec.o
:
krnl386.exe.spec version16.res
...
...
dlls/kernel32/kernel16.c
View file @
4d1cf9c8
...
...
@@ -206,3 +206,61 @@ void WINAPI WINOLDAP_EntryPoint( CONTEXT86 *context )
HeapFree
(
GetProcessHeap
(),
0
,
cmdline
);
ExitThread
(
exit_code
);
}
/**************************************************************************
* WINHELP entry point
*
* FIXME: should go into winhlp32.exe, but we don't support 16-bit modules in executables yet.
*/
void
WINAPI
WINHELP_EntryPoint
(
CONTEXT86
*
context
)
{
static
const
WCHAR
winhlp32W
[]
=
{
'\\'
,
'w'
,
'i'
,
'n'
,
'h'
,
'l'
,
'p'
,
'3'
,
'2'
,
'.'
,
'e'
,
'x'
,
'e'
,
0
};
PDB16
*
psp
;
INT
len
,
total
;
WCHAR
*
cmdline
,
*
p
;
PROCESS_INFORMATION
info
;
STARTUPINFOW
startup
;
DWORD
count
,
exit_code
=
1
;
InitTask16
(
context
);
TRACE
(
"(ds=%x es=%x fs=%x gs=%x, bx=%04x cx=%04x di=%04x si=%x)
\n
"
,
context
->
SegDs
,
context
->
SegEs
,
context
->
SegFs
,
context
->
SegGs
,
context
->
Ebx
,
context
->
Ecx
,
context
->
Edi
,
context
->
Esi
);
psp
=
GlobalLock16
(
context
->
SegEs
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
(
char
*
)
psp
->
cmdLine
+
1
,
psp
->
cmdLine
[
0
],
NULL
,
0
);
total
=
(
GetSystemDirectoryW
(
NULL
,
0
)
+
len
+
1
)
*
sizeof
(
WCHAR
)
+
sizeof
(
winhlp32W
);
cmdline
=
HeapAlloc
(
GetProcessHeap
(),
0
,
total
);
GetSystemDirectoryW
(
cmdline
,
total
);
lstrcatW
(
cmdline
,
winhlp32W
);
p
=
cmdline
+
lstrlenW
(
cmdline
);
if
(
len
)
{
*
p
++
=
' '
;
MultiByteToWideChar
(
CP_ACP
,
0
,
(
char
*
)
psp
->
cmdLine
+
1
,
psp
->
cmdLine
[
0
],
p
,
len
);
p
[
len
]
=
0
;
}
memset
(
&
startup
,
0
,
sizeof
(
startup
)
);
startup
.
cb
=
sizeof
(
startup
);
if
(
CreateProcessW
(
NULL
,
cmdline
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
startup
,
&
info
))
{
/* Give 10 seconds to the app to come up */
if
(
wait_input_idle
(
info
.
hProcess
,
10000
)
==
WAIT_FAILED
)
WARN
(
"WaitForInputIdle failed: Error %d
\n
"
,
GetLastError
()
);
ReleaseThunkLock
(
&
count
);
WaitForSingleObject
(
info
.
hProcess
,
INFINITE
);
GetExitCodeProcess
(
info
.
hProcess
,
&
exit_code
);
CloseHandle
(
info
.
hThread
);
CloseHandle
(
info
.
hProcess
);
}
else
ReleaseThunkLock
(
&
count
);
HeapFree
(
GetProcessHeap
(),
0
,
cmdline
);
ExitThread
(
exit_code
);
}
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