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
c52d921f
Commit
c52d921f
authored
Mar 03, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Added a winoldap.mod 16-bit exe to launch 32-bit processes.
Based on a patch by Dmitry Timoshkov.
parent
0c214a70
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
80 additions
and
6 deletions
+80
-6
.gitignore
.gitignore
+1
-0
Makefile.in
dlls/Makefile.in
+2
-1
Makefile.in
dlls/kernel32/Makefile.in
+4
-0
kernel16.c
dlls/kernel32/kernel16.c
+44
-0
ne_module.c
dlls/kernel32/ne_module.c
+20
-4
winbase16.h
include/wine/winbase16.h
+1
-0
make_makefiles
tools/make_makefiles
+8
-1
No files found.
.gitignore
View file @
c52d921f
...
@@ -559,6 +559,7 @@ dlls/winmm/tests/winmm_crosstest.exe
...
@@ -559,6 +559,7 @@ dlls/winmm/tests/winmm_crosstest.exe
dlls/winmm/winmm_res.res
dlls/winmm/winmm_res.res
dlls/winnls.dll16
dlls/winnls.dll16
dlls/winnls32/libwinnls32.def
dlls/winnls32/libwinnls32.def
dlls/winoldap.mod16
dlls/winscard/libwinscard.def
dlls/winscard/libwinscard.def
dlls/winscard/rsrc.res
dlls/winscard/rsrc.res
dlls/winsock.dll16
dlls/winsock.dll16
...
...
dlls/Makefile.in
View file @
c52d921f
...
@@ -419,6 +419,7 @@ WIN16_FILES = \
...
@@ -419,6 +419,7 @@ WIN16_FILES = \
wineps16.drv16
\
wineps16.drv16
\
wing.dll16
\
wing.dll16
\
winnls.dll16
\
winnls.dll16
\
winoldap.mod16
\
winsock.dll16
\
winsock.dll16
\
wintab.dll16
\
wintab.dll16
\
wprocs.dll16
wprocs.dll16
...
@@ -446,7 +447,7 @@ dispdib.dll16 gdi.exe16 wing.dll16:
...
@@ -446,7 +447,7 @@ dispdib.dll16 gdi.exe16 wing.dll16:
imm.dll16
:
imm.dll16
:
echo
"imm32.dll"
>
$@
echo
"imm32.dll"
>
$@
comm.drv16 krnl386.exe16 stress.dll16 system.drv16 toolhelp.dll16 win87em.dll16 windebug.dll16
:
comm.drv16 krnl386.exe16 stress.dll16 system.drv16 toolhelp.dll16 win87em.dll16 windebug.dll16
winoldap.mod16
:
echo
"kernel32.dll"
>
$@
echo
"kernel32.dll"
>
$@
lzexpand.dll16
:
lzexpand.dll16
:
...
...
dlls/kernel32/Makefile.in
View file @
c52d921f
...
@@ -96,6 +96,7 @@ MC_SRCS = \
...
@@ -96,6 +96,7 @@ MC_SRCS = \
nls/winerr_kor.mc
nls/winerr_kor.mc
EXTRA_OBJS
=
relay16asm.o
EXTRA_OBJS
=
relay16asm.o
EXTRA_OBJS16
=
winoldap.mod.o
EXTRASUBDIRS
=
nls
EXTRASUBDIRS
=
nls
...
@@ -106,6 +107,9 @@ kernel.res: $(MC_SRCS:.mc=.mc.rc)
...
@@ -106,6 +107,9 @@ kernel.res: $(MC_SRCS:.mc=.mc.rc)
relay16asm.o
:
$(WINEBUILD)
relay16asm.o
:
$(WINEBUILD)
$(WINEBUILD)
$(WINEBUILDFLAGS)
-o
$@
--relay16
$(WINEBUILD)
$(WINEBUILDFLAGS)
-o
$@
--relay16
winoldap.mod.o
:
$(WINEBUILD)
$(WINEBUILD)
$(WINEBUILDFLAGS)
--exe
-o
$@
--main-module
$(MODULE)
--entry
WINOLDAP_EntryPoint
# Special rules for 16-bit resource and spec files
# Special rules for 16-bit resource and spec files
krnl386.exe.spec.o
:
krnl386.exe.spec version16.res
krnl386.exe.spec.o
:
krnl386.exe.spec version16.res
...
...
dlls/kernel32/kernel16.c
View file @
c52d921f
...
@@ -28,6 +28,9 @@
...
@@ -28,6 +28,9 @@
#include "toolhelp.h"
#include "toolhelp.h"
#include "kernel_private.h"
#include "kernel_private.h"
#include "kernel16_private.h"
#include "kernel16_private.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
module
);
/**************************************************************************
/**************************************************************************
* DllEntryPoint (KERNEL.669)
* DllEntryPoint (KERNEL.669)
...
@@ -130,3 +133,44 @@ HANDLE WINAPI CreateThread16( SECURITY_ATTRIBUTES *sa, DWORD stack,
...
@@ -130,3 +133,44 @@ HANDLE WINAPI CreateThread16( SECURITY_ATTRIBUTES *sa, DWORD stack,
args
->
param
=
param
;
args
->
param
=
param
;
return
CreateThread
(
sa
,
stack
,
start_thread16
,
args
,
flags
,
id
);
return
CreateThread
(
sa
,
stack
,
start_thread16
,
args
,
flags
,
id
);
}
}
/**************************************************************************
* WINOLDAP entry point
*/
void
WINAPI
WINOLDAP_EntryPoint
(
CONTEXT86
*
context
)
{
PDB16
*
psp
;
INT
len
;
LPSTR
cmdline
;
PROCESS_INFORMATION
info
;
STARTUPINFOA
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
=
psp
->
cmdLine
[
0
];
cmdline
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
+
1
);
memcpy
(
cmdline
,
psp
->
cmdLine
+
1
,
len
);
cmdline
[
len
]
=
0
;
ReleaseThunkLock
(
&
count
);
memset
(
&
startup
,
0
,
sizeof
(
startup
)
);
startup
.
cb
=
sizeof
(
startup
);
/* FIXME: Should this be WinExec instead of CreateProcess? */
if
(
CreateProcessA
(
NULL
,
cmdline
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
startup
,
&
info
))
{
WaitForSingleObject
(
info
.
hProcess
,
INFINITE
);
GetExitCodeProcess
(
info
.
hProcess
,
&
exit_code
);
CloseHandle
(
info
.
hThread
);
CloseHandle
(
info
.
hProcess
);
}
HeapFree
(
GetProcessHeap
(),
0
,
cmdline
);
ExitThread
(
exit_code
);
}
dlls/kernel32/ne_module.c
View file @
c52d921f
...
@@ -1197,6 +1197,8 @@ HINSTANCE16 WINAPI LoadModule16( LPCSTR name, LPVOID paramBlock )
...
@@ -1197,6 +1197,8 @@ HINSTANCE16 WINAPI LoadModule16( LPCSTR name, LPVOID paramBlock )
if
(
name
==
NULL
)
return
0
;
if
(
name
==
NULL
)
return
0
;
TRACE
(
"name %s, paramBlock %p
\n
"
,
name
,
paramBlock
);
/* Load module */
/* Load module */
if
(
(
hModule
=
NE_GetModuleByFilename
(
name
)
)
!=
0
)
if
(
(
hModule
=
NE_GetModuleByFilename
(
name
)
)
!=
0
)
...
@@ -1707,10 +1709,24 @@ HINSTANCE16 WINAPI WinExec16( LPCSTR lpCmdLine, UINT16 nCmdShow )
...
@@ -1707,10 +1709,24 @@ HINSTANCE16 WINAPI WinExec16( LPCSTR lpCmdLine, UINT16 nCmdShow )
if
(
ret
==
21
||
ret
==
ERROR_BAD_FORMAT
)
/* 32-bit module or unknown executable*/
if
(
ret
==
21
||
ret
==
ERROR_BAD_FORMAT
)
/* 32-bit module or unknown executable*/
{
{
DWORD
count
;
LOADPARAMS16
params
;
ReleaseThunkLock
(
&
count
);
WORD
showCmd
[
2
];
ret
=
LOWORD
(
WinExec
(
lpCmdLine
,
nCmdShow
)
);
showCmd
[
0
]
=
2
;
RestoreThunkLock
(
count
);
showCmd
[
1
]
=
nCmdShow
;
arglen
=
strlen
(
lpCmdLine
);
cmdline
=
HeapAlloc
(
GetProcessHeap
(),
0
,
arglen
+
1
);
cmdline
[
0
]
=
(
BYTE
)
arglen
;
memcpy
(
cmdline
+
1
,
lpCmdLine
,
arglen
);
params
.
hEnvironment
=
0
;
params
.
cmdLine
=
MapLS
(
cmdline
);
params
.
showCmd
=
MapLS
(
showCmd
);
params
.
reserved
=
0
;
ret
=
LoadModule16
(
"winoldap.mod"
,
&
params
);
UnMapLS
(
params
.
cmdLine
);
UnMapLS
(
params
.
showCmd
);
}
}
return
ret
;
return
ret
;
}
}
...
...
include/wine/winbase16.h
View file @
c52d921f
...
@@ -452,6 +452,7 @@ BOOL16 WINAPI GlobalUnlock16(HGLOBAL16);
...
@@ -452,6 +452,7 @@ BOOL16 WINAPI GlobalUnlock16(HGLOBAL16);
BOOL16
WINAPI
GlobalUnWire16
(
HGLOBAL16
);
BOOL16
WINAPI
GlobalUnWire16
(
HGLOBAL16
);
SEGPTR
WINAPI
GlobalWire16
(
HGLOBAL16
);
SEGPTR
WINAPI
GlobalWire16
(
HGLOBAL16
);
WORD
WINAPI
InitAtomTable16
(
WORD
);
WORD
WINAPI
InitAtomTable16
(
WORD
);
void
WINAPI
InitTask16
(
CONTEXT86
*
);
BOOL16
WINAPI
IsBadCodePtr16
(
SEGPTR
);
BOOL16
WINAPI
IsBadCodePtr16
(
SEGPTR
);
BOOL16
WINAPI
IsBadHugeReadPtr16
(
SEGPTR
,
DWORD
);
BOOL16
WINAPI
IsBadHugeReadPtr16
(
SEGPTR
,
DWORD
);
BOOL16
WINAPI
IsBadHugeWritePtr16
(
SEGPTR
,
DWORD
);
BOOL16
WINAPI
IsBadHugeWritePtr16
(
SEGPTR
,
DWORD
);
...
...
tools/make_makefiles
View file @
c52d921f
...
@@ -225,7 +225,7 @@ sub parse_makefile($)
...
@@ -225,7 +225,7 @@ sub parse_makefile($)
$make
{
$1
}
=
$2
;
$make
{
$1
}
=
$2
;
next
;
next
;
}
}
if
(
/^(BISON_SRCS|LEX_SRCS|IDL_[CHIPS]_SRCS|IDL_TLB_SRCS|IMPLIB_SRCS|MC_SRCS|RC_SRCS|RC_SRCS16|RC_BINARIES|SPEC_SRCS16|MANPAGES|PROGRAMS)\s*=\s*(.*)/
)
if
(
/^(BISON_SRCS|LEX_SRCS|IDL_[CHIPS]_SRCS|IDL_TLB_SRCS|IMPLIB_SRCS|MC_SRCS|RC_SRCS|RC_SRCS16|RC_BINARIES|SPEC_SRCS16|
EXTRA_OBJS16|
MANPAGES|PROGRAMS)\s*=\s*(.*)/
)
{
{
my
@list
=
split
(
/\s+/
,
$2
);
my
@list
=
split
(
/\s+/
,
$2
);
$make
{
$1
}
=
\
@list
;
$make
{
$1
}
=
\
@list
;
...
@@ -422,6 +422,13 @@ sub update_dlls(@)
...
@@ -422,6 +422,13 @@ sub update_dlls(@)
my
@list
=
map
{
$_
=~
s/\.spec$//
;
$_
.=
".dll"
unless
$_
=~
/\./
;
$_
;
}
@
{
$makefile
{
"SPEC_SRCS16"
}};
my
@list
=
map
{
$_
=~
s/\.spec$//
;
$_
.=
".dll"
unless
$_
=~
/\./
;
$_
;
}
@
{
$makefile
{
"SPEC_SRCS16"
}};
$altnames
{
$module
}
=
\
@list
;
$altnames
{
$module
}
=
\
@list
;
}
}
if
(
defined
$makefile
{
"EXTRA_OBJS16"
})
{
foreach
my
$obj
(
@
{
$makefile
{
"EXTRA_OBJS16"
}})
{
if
(
$obj
=~
/^(.*\.(exe|mod))\.o/
)
{
push
@
{
$altnames
{
$module
}},
$1
;
}
}
}
}
}
# output special dlls configure definitions
# output special dlls configure definitions
...
...
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