Fixed ShellExecute functions when ddeexec was present in registry.
[wine] / dlls / win32s / win32s16.c
1 /*
2  * WIN32S16
3  * DLL for Win32s
4  *
5  * Copyright (c) 1997 Andreas Mohr
6  */
7
8 #include <string.h>
9 #include <stdlib.h>
10 #include "windef.h"
11 #include "wine/winbase16.h"
12 #include "debugtools.h"
13
14 DEFAULT_DEBUG_CHANNEL(dll);
15
16 /***********************************************************************
17  *              BootTask (WIN32S16.2)
18  */
19 void WINAPI BootTask16()
20 {
21         MESSAGE("BootTask(): should only be used by WIN32S.EXE.\n");
22 }
23
24 /***********************************************************************
25  *           StackLinearToSegmented       (WIN32S16.43)
26  *
27  * Written without any docu.
28  */
29 SEGPTR WINAPI StackLinearToSegmented16(WORD w1, WORD w2)
30 {
31         FIXME("(%d,%d):stub.\n",w1,w2);
32         return (SEGPTR)NULL;
33 }
34
35
36 /***********************************************************************
37  *           UTSelectorOffsetToLinear       (WIN32S16.48)
38  *
39  * rough guesswork, but seems to work (I had no "reasonable" docu)
40  */
41 LPVOID WINAPI UTSelectorOffsetToLinear16(SEGPTR sptr)
42 {
43         return MapSL(sptr);
44 }
45
46 /***********************************************************************
47  *           UTLinearToSelectorOffset       (WIN32S16.49)
48  *
49  * FIXME: I don't know if that's the right way to do linear -> segmented
50  */
51 SEGPTR WINAPI UTLinearToSelectorOffset16(LPVOID lptr)
52 {
53     return (SEGPTR)lptr;
54 }
55
56 /***********************************************************************
57  *           ContinueDebugEvent       (WIN32S16.5)
58  */
59 BOOL WINAPI ContinueDebugEvent16(DWORD pid, DWORD tid, DWORD status)
60 {
61     return ContinueDebugEvent(pid, tid, status);
62 }
63
64 /***********************************************************************
65  *           ReadProcessMemory       (WIN32S16.6)
66  */
67 BOOL WINAPI ReadProcessMemory16(HANDLE process, LPCVOID addr, LPVOID buffer,
68                                 DWORD size, LPDWORD bytes_read)
69 {
70     return ReadProcessMemory(process, addr, buffer, size, bytes_read);
71 }
72
73 /***********************************************************************
74  *           GetLastError       (WIN32S16.10)
75  */
76 DWORD WINAPI GetLastError16(void)
77 {
78     return GetLastError();
79 }
80
81 /***********************************************************************
82  *           CloseHandle        (WIN32S16.11)
83  */
84 BOOL WINAPI CloseHandle16(HANDLE handle)
85 {
86     return CloseHandle(handle);
87 }
88
89 /***********************************************************************
90  *           GetExitCodeThread  (WIN32S16.13)
91  */
92 BOOL WINAPI GetExitCodeThread16(HANDLE hthread, LPDWORD exitcode)
93 {
94     return GetExitCodeThread(hthread, exitcode);
95 }
96
97 /***********************************************************************
98  *           VirtualQueryEx     (WIN32S16.18)
99  */
100 DWORD WINAPI VirtualQueryEx16(HANDLE handle, LPCVOID addr,
101                               LPMEMORY_BASIC_INFORMATION info, DWORD len)
102 {
103     return VirtualQueryEx(handle, addr, info, len);
104 }
105
106 /***********************************************************************
107  *           VirtualProtectEx   (WIN32S16.19)
108  */
109 BOOL WINAPI VirtualProtectEx16(HANDLE handle, LPVOID addr, DWORD size,
110                                DWORD new_prot, LPDWORD old_prot)
111 {
112     return VirtualProtectEx(handle, addr, size, new_prot, old_prot);
113 }