mshtml: Added IOmHistory::get_length implementation.
[wine] / dlls / win32s16.dll16 / win32s16.c
1 /*
2  * WIN32S16
3  * DLL for Win32s
4  *
5  * Copyright (c) 1997 Andreas Mohr
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20  */
21
22 #include <stdarg.h>
23 #include <string.h>
24 #include <stdlib.h>
25 #include "windef.h"
26 #include "winbase.h"
27 #include "wine/winbase16.h"
28 #include "wine/debug.h"
29
30 WINE_DEFAULT_DEBUG_CHANNEL(dll);
31
32 /***********************************************************************
33  *              BootTask (WIN32S16.2)
34  */
35 void WINAPI BootTask16(void)
36 {
37         MESSAGE("BootTask(): should only be used by WIN32S.EXE.\n");
38 }
39
40 /***********************************************************************
41  *           StackLinearToSegmented       (WIN32S16.43)
42  *
43  * Written without any docu.
44  */
45 SEGPTR WINAPI StackLinearToSegmented16(WORD w1, WORD w2)
46 {
47         FIXME("(%d,%d):stub.\n",w1,w2);
48         return 0;
49 }
50
51
52 /***********************************************************************
53  *           UTSelectorOffsetToLinear       (WIN32S16.48)
54  *
55  * rough guesswork, but seems to work (I had no "reasonable" docu)
56  */
57 LPVOID WINAPI UTSelectorOffsetToLinear16(SEGPTR sptr)
58 {
59         return MapSL(sptr);
60 }
61
62 /***********************************************************************
63  *           UTLinearToSelectorOffset       (WIN32S16.49)
64  *
65  * FIXME: I don't know if that's the right way to do linear -> segmented
66  */
67 SEGPTR WINAPI UTLinearToSelectorOffset16(LPVOID lptr)
68 {
69     return (SEGPTR)lptr;
70 }
71
72 /***********************************************************************
73  *           ContinueDebugEvent       (WIN32S16.5)
74  */
75 BOOL WINAPI ContinueDebugEvent16(DWORD pid, DWORD tid, DWORD status)
76 {
77     return ContinueDebugEvent(pid, tid, status);
78 }
79
80 /***********************************************************************
81  *           ReadProcessMemory       (WIN32S16.6)
82  */
83 BOOL WINAPI ReadProcessMemory16(HANDLE process, LPCVOID addr, LPVOID buffer,
84                                 DWORD size, LPDWORD bytes_read)
85 {
86     return ReadProcessMemory(process, addr, buffer, size, (SIZE_T *)bytes_read);
87 }
88
89 /***********************************************************************
90  *           GetLastError       (WIN32S16.10)
91  */
92 DWORD WINAPI GetLastError16(void)
93 {
94     return GetLastError();
95 }
96
97 /***********************************************************************
98  *           CloseHandle        (WIN32S16.11)
99  */
100 BOOL WINAPI CloseHandle16(HANDLE handle)
101 {
102     return CloseHandle(handle);
103 }
104
105 /***********************************************************************
106  *           GetExitCodeThread  (WIN32S16.13)
107  */
108 BOOL WINAPI GetExitCodeThread16(HANDLE hthread, LPDWORD exitcode)
109 {
110     return GetExitCodeThread(hthread, exitcode);
111 }
112
113 /***********************************************************************
114  *           VirtualQueryEx     (WIN32S16.18)
115  */
116 DWORD WINAPI VirtualQueryEx16(HANDLE handle, LPCVOID addr,
117                               PMEMORY_BASIC_INFORMATION info, DWORD len)
118 {
119     return VirtualQueryEx(handle, addr, info, len);
120 }
121
122 /***********************************************************************
123  *           VirtualProtectEx   (WIN32S16.19)
124  */
125 BOOL WINAPI VirtualProtectEx16(HANDLE handle, LPVOID addr, DWORD size,
126                                DWORD new_prot, LPDWORD old_prot)
127 {
128     return VirtualProtectEx(handle, addr, size, new_prot, old_prot);
129 }