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
a1cf6485
Commit
a1cf6485
authored
Feb 24, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Make winoldap.mod into a stand-alone 16-bit executable.
parent
825d7fda
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
118 additions
and
55 deletions
+118
-55
.gitignore
.gitignore
+0
-1
configure
configure
+11
-0
configure.ac
configure.ac
+2
-0
Makefile.in
dlls/Makefile.in
+1
-2
Makefile.in
dlls/kernel32/Makefile.in
+1
-4
kernel16.c
dlls/kernel32/kernel16.c
+0
-48
Makefile.in
programs/winoldap.mod16/Makefile.in
+13
-0
winoldap.c
programs/winoldap.mod16/winoldap.c
+90
-0
No files found.
.gitignore
View file @
a1cf6485
...
...
@@ -126,7 +126,6 @@ dlls/wineps16.drv16
dlls/wing.dll16
dlls/winhelp.exe16
dlls/winnls.dll16
dlls/winoldap.mod16
dlls/winsock.dll16
dlls/wintab.dll16
dlls/wprocs.dll16
...
...
configure
View file @
a1cf6485
...
...
@@ -3909,6 +3909,7 @@ then
enable_w32skrnl
=
${
enable_w32skrnl
:-
no
}
enable_winedos
=
${
enable_winedos
:-
no
}
enable_winevdm
=
${
enable_winevdm
:-
no
}
enable_winoldap_mod16
=
${
enable_winoldap_mod16
:-
no
}
fi
{
$as_echo
"
$as_me
:
$LINENO
: checking for the directory containing the Wine tools"
>
&5
...
...
@@ -27889,6 +27890,15 @@ programs/winhlp32/Makefile: programs/winhlp32/Makefile.in programs/Makeprog.rule
ac_config_files
=
"
$ac_config_files
programs/winhlp32/Makefile"
ALL_MAKEFILES
=
"
$ALL_MAKEFILES
\\
programs/winoldap.mod16/Makefile"
test
"x
$enable_winoldap_mod16
"
!=
xno
&&
ALL_PROGRAM_DIRS
=
"
$ALL_PROGRAM_DIRS
\\
winoldap.mod16"
&&
ALL_PROGRAM_INSTALL_DIRS
=
"
$ALL_PROGRAM_INSTALL_DIRS
\\
winoldap.mod16"
ALL_MAKEFILE_DEPENDS
=
"
$ALL_MAKEFILE_DEPENDS
programs/winoldap.mod16/Makefile: programs/winoldap.mod16/Makefile.in programs/Makeprog.rules"
ac_config_files
=
"
$ac_config_files
programs/winoldap.mod16/Makefile"
ALL_MAKEFILES
=
"
$ALL_MAKEFILES
\\
programs/winver/Makefile"
test
"x
$enable_winver
"
!=
xno
&&
ALL_PROGRAM_DIRS
=
"
$ALL_PROGRAM_DIRS
\\
winver"
&&
ALL_PROGRAM_INSTALL_DIRS
=
"
$ALL_PROGRAM_INSTALL_DIRS
\\
...
...
@@ -29052,6 +29062,7 @@ do
"programs/winetest/Makefile") CONFIG_FILES="
$CONFIG_FILES
programs/winetest/Makefile" ;;
"programs/winevdm/Makefile") CONFIG_FILES="
$CONFIG_FILES
programs/winevdm/Makefile" ;;
"programs/winhlp32/Makefile") CONFIG_FILES="
$CONFIG_FILES
programs/winhlp32/Makefile" ;;
"programs/winoldap.mod16/Makefile") CONFIG_FILES="
$CONFIG_FILES
programs/winoldap.mod16/Makefile" ;;
"programs/winver/Makefile") CONFIG_FILES="
$CONFIG_FILES
programs/winver/Makefile" ;;
"programs/wordpad/Makefile") CONFIG_FILES="
$CONFIG_FILES
programs/wordpad/Makefile" ;;
"programs/write/Makefile") CONFIG_FILES="
$CONFIG_FILES
programs/write/Makefile" ;;
...
...
configure.ac
View file @
a1cf6485
...
...
@@ -146,6 +146,7 @@ then
enable_w32skrnl=${enable_w32skrnl:-no}
enable_winedos=${enable_winedos:-no}
enable_winevdm=${enable_winevdm:-no}
enable_winoldap_mod16=${enable_winoldap_mod16:-no}
fi
AC_CACHE_CHECK([for the directory containing the Wine tools], wine_cv_toolsdir,
...
...
@@ -2306,6 +2307,7 @@ WINE_CONFIG_MAKEFILE([programs/winepath/Makefile],[programs/Makeprog.rules],[pro
WINE_CONFIG_MAKEFILE([programs/winetest/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS])
WINE_CONFIG_MAKEFILE([programs/winevdm/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS])
WINE_CONFIG_MAKEFILE([programs/winhlp32/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS])
WINE_CONFIG_MAKEFILE([programs/winoldap.mod16/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS])
WINE_CONFIG_MAKEFILE([programs/winver/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS])
WINE_CONFIG_MAKEFILE([programs/wordpad/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS])
WINE_CONFIG_MAKEFILE([programs/write/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS])
...
...
dlls/Makefile.in
View file @
a1cf6485
...
...
@@ -65,7 +65,6 @@ WIN16_FILES = \
wing.dll16
\
winhelp.exe16
\
winnls.dll16
\
winoldap.mod16
\
winsock.dll16
\
wintab.dll16
\
wprocs.dll16
...
...
@@ -93,7 +92,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 winhelp.exe16
winoldap.mod16
:
comm.drv16 krnl386.exe16 stress.dll16 system.drv16 toolhelp.dll16 win87em.dll16 windebug.dll16 winhelp.exe16
:
echo
"kernel32.dll"
>
$@
lzexpand.dll16
:
...
...
dlls/kernel32/Makefile.in
View file @
a1cf6485
...
...
@@ -96,7 +96,7 @@ MC_SRCS = \
nls/winerr_nor.mc
EXTRA_OBJS
=
relay16asm.o
EXTRA_OBJS16
=
winhelp.exe.o
winoldap.mod.o
EXTRA_OBJS16
=
winhelp.exe.o
EXTRASUBDIRS
=
nls
...
...
@@ -107,9 +107,6 @@ kernel.res: $(MC_SRCS:.mc=.mc.rc)
relay16asm.o
:
$(WINEBUILD)
$(WINEBUILD)
$(WINEBUILDFLAGS)
-o
$@
--relay16
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
...
...
dlls/kernel32/kernel16.c
View file @
a1cf6485
...
...
@@ -162,54 +162,6 @@ static DWORD wait_input_idle( HANDLE process, DWORD timeout )
/**************************************************************************
* 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
;
memset
(
&
startup
,
0
,
sizeof
(
startup
)
);
startup
.
cb
=
sizeof
(
startup
);
if
(
CreateProcessA
(
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
);
}
/**************************************************************************
* WINHELP entry point
*
* FIXME: should go into winhlp32.exe, but we don't support 16-bit modules in executables yet.
...
...
programs/winoldap.mod16/Makefile.in
0 → 100644
View file @
a1cf6485
TOPSRCDIR
=
@top_srcdir@
TOPOBJDIR
=
../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
MODULE
=
winoldap.mod16
APPMODE
=
-mwindows
-Wb
,--subsystem,win16
IMPORTS
=
kernel32 ntdll
C_SRCS
=
winoldap.c
@MAKE_PROG_RULES@
@DEPENDENCIES@
# everything below this line is overwritten by make depend
programs/winoldap.mod16/winoldap.c
0 → 100644
View file @
a1cf6485
/*
* WINOLDAP implementation
*
* Copyright 2000 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "wownt32.h"
#include "wine/winbase16.h"
#include "wine/server.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
module
);
/***********************************************************************
* wait_input_idle
*
* user32.WaitForInputIdle releases the win16 lock, so here is a replacement.
*/
static
DWORD
wait_input_idle
(
HANDLE
process
,
DWORD
timeout
)
{
DWORD
ret
;
HANDLE
handles
[
2
];
handles
[
0
]
=
process
;
SERVER_START_REQ
(
get_process_idle_event
)
{
req
->
handle
=
wine_server_obj_handle
(
process
);
if
(
!
(
ret
=
wine_server_call_err
(
req
)))
handles
[
1
]
=
wine_server_ptr_handle
(
reply
->
event
);
}
SERVER_END_REQ
;
if
(
ret
)
return
WAIT_FAILED
;
/* error */
if
(
!
handles
[
1
])
return
0
;
/* no event to wait on */
return
WaitForMultipleObjects
(
2
,
handles
,
FALSE
,
timeout
);
}
/**************************************************************************
* WINOLDAP entry point
*/
WORD
WINAPI
WinMain16
(
HINSTANCE16
inst
,
HINSTANCE16
prev
,
LPSTR
cmdline
,
WORD
show
)
{
PROCESS_INFORMATION
info
;
STARTUPINFOA
startup
;
DWORD
count
,
exit_code
=
1
;
WINE_TRACE
(
"%x %x %s %u
\n
"
,
inst
,
prev
,
wine_dbgstr_a
(
cmdline
),
show
);
memset
(
&
startup
,
0
,
sizeof
(
startup
)
);
startup
.
cb
=
sizeof
(
startup
);
if
(
CreateProcessA
(
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
)
WINE_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